home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-02 | 148.1 KB | 3,499 lines |
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- N✓NA✓AM✓ME✓E
- gcc, g++ - GNU project C and C++ Compiler (v2.6)
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- g✓gc✓cc✓c [ _✓o_✓p_✓t_✓i_✓o_✓n | _✓f_✓i_✓l_✓e_✓n_✓a_✓m_✓e ]...
- g✓g+✓++✓+ [ _✓o_✓p_✓t_✓i_✓o_✓n | _✓f_✓i_✓l_✓e_✓n_✓a_✓m_✓e ]...
-
- W✓WA✓AR✓RN✓NI✓IN✓NG✓G
- The information in this man page is an extract from the
- full documentation of the GNU C compiler, and is limited
- to the meaning of the options.
-
- This man page is not kept up to date except when volun-
- teers want to maintain it. If you find a discrepancy
- between the man page and the software, please check the
- Info file, which is the authoritative documentation.
-
- If we find that the things in this man page that are out
- of date cause significant confusion or complaints, we will
- stop distributing the man page. The alternative, updating
- the man page when we update the Info file, is impossible
- because the rest of the work of maintaining GNU CC leaves
- us no time for that. The GNU project regards man pages as
- obsolete and should not let them take time away from other
- things.
-
- For complete and current documentation, refer to the Info
- file `g✓gc✓cc✓c' or the manual _✓U_✓s_✓i_✓n_✓g _✓a_✓n_✓d _✓P_✓o_✓r_✓t_✓i_✓n_✓g _✓G_✓N_✓U _✓C_✓C _✓(_✓f_✓o_✓r
- _✓v_✓e_✓r_✓s_✓i_✓o_✓n _✓2_✓._✓0_✓). Both are made from the Texinfo source file
- g✓gc✓cc✓c.✓.t✓te✓ex✓xi✓in✓nf✓fo✓o.
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- The C and C++ compilers are integrated. Both process
- input files through one or more of four stages: prepro-
- cessing, compilation, assembly, and linking. Source file-
- name suffixes identify the source language, but which name
- you use for the compiler governs default assumptions:
-
- g✓gc✓cc✓c assumes preprocessed (.✓.i✓i) files are C and assumes C
- style linking.
-
- g✓g+✓++✓+ assumes preprocessed (.✓.i✓i) files are C++ and assumes
- C++ style linking.
-
- Suffixes of source file names indicate the language and
- kind of processing to be done:
-
- .✓.c✓c C source; preprocess, compile, assemble
- .✓.C✓C C++ source; preprocess, compile, assemble
- .✓.c✓cc✓c C++ source; preprocess, compile, assemble
- .✓.c✓cx✓xx✓x C++ source; preprocess, compile, assemble
- .✓.m✓m Objective-C source; preprocess, compile, assemble
- .✓.i✓i preprocessed C; compile, assemble
- .✓.i✓ii✓i preprocessed C++; compile, assemble
-
-
-
- GNU Tools 1993/10/13 1
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- .✓.s✓s Assembler source; assemble
- .✓.S✓S Assembler source; preprocess, assemble
- .✓.h✓h Preprocessor file; not usually named on command line
-
- Files with other suffixes are passed to the linker. Com-
- mon cases include:
-
- .✓.o✓o Object file
- .✓.a✓a Archive file
-
- Linking is always the last stage unless you use one of the
- -✓-c✓c, -✓-S✓S, or -✓-E✓E options to avoid it (or unless compilation
- errors stop the whole process). For the link stage, all
- .✓.o✓o files corresponding to source files, -✓-l✓l libraries,
- unrecognized filenames (including named .✓.o✓o object files
- and .✓.a✓a archives) are passed to the linker in command-line
- order.
-
- O✓OP✓PT✓TI✓IO✓ON✓NS✓S
- Options must be separate: `-✓-d✓dr✓r' is quite different from
- `-✓-d✓d -✓-r✓r '.
-
- Most `-✓-f✓f' and `-✓-W✓W' options have two contrary forms: -✓-f✓f_✓n_✓a_✓m_✓e
- and -✓-f✓fn✓no✓o-✓-_✓n_✓a_✓m_✓e (or -✓-W✓W_✓n_✓a_✓m_✓e and -✓-W✓Wn✓no✓o-✓-_✓n_✓a_✓m_✓e). Only the non-
- default forms are shown here.
-
- Here is a summary of all the options, grouped by type.
- Explanations are in the following sections.
-
- O✓Ov✓ve✓er✓ra✓al✓ll✓l O✓Op✓pt✓ti✓io✓on✓ns✓s
- -c -S -E -o _✓f_✓i_✓l_✓e -pipe -v -x _✓l_✓a_✓n_✓g_✓u_✓a_✓g_✓e
-
- L✓La✓an✓ng✓gu✓ua✓ag✓ge✓e O✓Op✓pt✓ti✓io✓on✓ns✓s
- -ansi -fall-virtual -fcond-mismatch
- -fdollars-in-identifiers -fenum-int-equiv
- -fexternal-templates -fno-asm -fno-builtin
- -fno-strict-prototype -fsigned-bitfields
- -fsigned-char -fthis-is-variable
- -funsigned-bitfields -funsigned-char
- -fwritable-strings -traditional -traditional-cpp
- -trigraphs
-
- W✓Wa✓ar✓rn✓ni✓in✓ng✓g O✓Op✓pt✓ti✓io✓on✓ns✓s
- -fsyntax-only -pedantic -pedantic-errors -w -W
- -Wall -Waggregate-return -Wcast-align -Wcast-qual
- -Wchar-subscript -Wcomment -Wconversion
- -Wenum-clash -Werror -Wformat -Wid-clash-_✓l_✓e_✓n
- -Wimplicit -Winline -Wmissing-prototypes
- -Wmissing-declarations -Wnested-externs -Wno-import
- -Wparentheses -Wpointer-arith -Wredundant-decls
- -Wreturn-type -Wshadow -Wstrict-prototypes -Wswitch
- -Wtemplate-debugging -Wtraditional -Wtrigraphs
- -Wuninitialized -Wunused -Wwrite-strings
-
-
-
-
- GNU Tools 1993/10/13 2
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- D✓De✓eb✓bu✓ug✓gg✓gi✓in✓ng✓g O✓Op✓pt✓ti✓io✓on✓ns✓s
- -a -d_✓l_✓e_✓t_✓t_✓e_✓r_✓s -fpretend-float -g -g_✓l_✓e_✓v_✓e_✓l -gcoff
- -gxcoff -gxcoff+ -gdwarf -gdwarf+ -gstabs -gstabs+
- -ggdb -p -pg -save-temps -print-file-name=_✓l_✓i_✓b_✓r_✓a_✓r_✓y
- -print-libgcc-file-name -print-prog-name=_✓p_✓r_✓o_✓g_✓r_✓a_✓m
-
- O✓Op✓pt✓ti✓im✓mi✓iz✓za✓at✓ti✓io✓on✓n O✓Op✓pt✓ti✓io✓on✓ns✓s
- -fcaller-saves -fcse-follow-jumps -fcse-skip-blocks
- -fdelayed-branch -felide-constructors
- -fexpensive-optimizations -ffast-math -ffloat-store
- -fforce-addr -fforce-mem -finline-functions
- -fkeep-inline-functions -fmemoize-lookups
- -fno-default-inline -fno-defer-pop
- -fno-function-cse -fno-inline -fno-peephole
- -fomit-frame-pointer -frerun-cse-after-loop
- -fschedule-insns -fschedule-insns2
- -fstrength-reduce -fthread-jumps -funroll-all-loops
- -funroll-loops -O -O2
-
- P✓Pr✓re✓ep✓pr✓ro✓oc✓ce✓es✓ss✓so✓or✓r O✓Op✓pt✓ti✓io✓on✓ns✓s
- -A_✓a_✓s_✓s_✓e_✓r_✓t_✓i_✓o_✓n -C -dD -dM -dN -D_✓m_✓a_✓c_✓r_✓o[=_✓d_✓e_✓f_✓n] -E -H
- -idirafter _✓d_✓i_✓r -include _✓f_✓i_✓l_✓e -imacros _✓f_✓i_✓l_✓e -iprefix
- _✓f_✓i_✓l_✓e -iwithprefix _✓d_✓i_✓r -M -MD -MM -MMD -nostdinc -P
- -U_✓m_✓a_✓c_✓r_✓o -undef
-
- A✓As✓ss✓se✓em✓mb✓bl✓le✓er✓r O✓Op✓pt✓ti✓io✓on✓n
- -Wa,_✓o_✓p_✓t_✓i_✓o_✓n
-
- L✓Li✓in✓nk✓ke✓er✓r O✓Op✓pt✓ti✓io✓on✓ns✓s
- -l_✓l_✓i_✓b_✓r_✓a_✓r_✓y -nostartfiles -nostdlib -static -shared
- -symbolic -Xlinker _✓o_✓p_✓t_✓i_✓o_✓n -Wl,_✓o_✓p_✓t_✓i_✓o_✓n -u _✓s_✓y_✓m_✓b_✓o_✓l
-
- D✓Di✓ir✓re✓ec✓ct✓to✓or✓ry✓y O✓Op✓pt✓ti✓io✓on✓ns✓s
- -B_✓p_✓r_✓e_✓f_✓i_✓x -I_✓d_✓i_✓r -I- -L_✓d_✓i_✓r
-
- T✓Ta✓ar✓rg✓ge✓et✓t O✓Op✓pt✓ti✓io✓on✓ns✓s
- -b _✓m_✓a_✓c_✓h_✓i_✓n_✓e -V _✓v_✓e_✓r_✓s_✓i_✓o_✓n
-
- C✓Co✓on✓nf✓fi✓ig✓gu✓ur✓ra✓at✓ti✓io✓on✓n D✓De✓ep✓pe✓en✓nd✓de✓en✓nt✓t O✓Op✓pt✓ti✓io✓on✓ns✓s
- _✓M_✓6_✓8_✓0_✓x_✓0 _✓O_✓p_✓t_✓i_✓o_✓n_✓s
- -m68000 -m68020 -m68020-40 -m68030 -m68040 -m68881
- -mbitfield -mc68000 -mc68020 -mfpa -mnobitfield
- -mrtd -mshort -msoft-float
-
- _✓V_✓A_✓X _✓O_✓p_✓t_✓i_✓o_✓n_✓s
- -mg -mgnu -munix
-
- _✓S_✓P_✓A_✓R_✓C _✓O_✓p_✓t_✓i_✓o_✓n_✓s
- -mepilogue -mfpu -mhard-float -mno-fpu
- -mno-epilogue -msoft-float -msparclite -mv8
- -msupersparc -mcypress
-
- _✓C_✓o_✓n_✓v_✓e_✓x _✓O_✓p_✓t_✓i_✓o_✓n_✓s
- -margcount -mc1 -mc2 -mnoargcount
-
-
-
- GNU Tools 1993/10/13 3
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- _✓A_✓M_✓D_✓2_✓9_✓K _✓O_✓p_✓t_✓i_✓o_✓n_✓s
- -m29000 -m29050 -mbw -mdw -mkernel-registers
- -mlarge -mnbw -mnodw -msmall -mstack-check
- -muser-registers
-
- _✓M_✓8_✓8_✓K _✓O_✓p_✓t_✓i_✓o_✓n_✓s
- -m88000 -m88100 -m88110 -mbig-pic
- -mcheck-zero-division -mhandle-large-shift
- -midentify-revision -mno-check-zero-division
- -mno-ocs-debug-info -mno-ocs-frame-position
- -mno-optimize-arg-area -mno-seriazlize-volatile
- -mno-underscores -mocs-debug-info
- -mocs-frame-position -moptimize-arg-area
- -mserialize-volatile -mshort-data-_✓n_✓u_✓m -msvr3 -msvr4
- -mtrap-large-shift -muse-div-instruction
- -mversion-03.00 -mwarn-passed-structs
-
- _✓R_✓S_✓6_✓0_✓0_✓0 _✓O_✓p_✓t_✓i_✓o_✓n_✓s
- -mfp-in-toc -mno-fop-in-toc
-
- _✓R_✓T _✓O_✓p_✓t_✓i_✓o_✓n_✓s
- -mcall-lib-mul -mfp-arg-in-fpregs -mfp-arg-in-gregs
- -mfull-fp-blocks -mhc-struct-return -min-line-mul
- -mminimum-fp-blocks -mnohc-struct-return
-
- _✓M_✓I_✓P_✓S _✓O_✓p_✓t_✓i_✓o_✓n_✓s
- -mcpu=_✓c_✓p_✓u _✓t_✓y_✓p_✓e -mips2 -mips3 -mint64 -mlong64
- -mlonglong128 -mmips-as -mgas -mrnames -mno-rnames
- -mgpopt -mno-gpopt -mstats -mno-stats -mmemcpy
- -mno-memcpy -mno-mips-tfile -mmips-tfile
- -msoft-float -mhard-float -mabicalls -mno-abicalls
- -mhalf-pic -mno-half-pic -G _✓n_✓u_✓m -nocpp
-
- _✓i_✓3_✓8_✓6 _✓O_✓p_✓t_✓i_✓o_✓n_✓s
- -m486 -mno-486 -msoft-float -mno-fp-ret-in-387
-
- _✓H_✓P_✓P_✓A _✓O_✓p_✓t_✓i_✓o_✓n_✓s
- -mpa-risc-1-0 -mpa-risc-1-1 -mkernel -mshared-libs
- -mno-shared-libs -mlong-calls -mdisable-fpregs
- -mdisable-indexing -mtrailing-colon
-
- _✓i_✓9_✓6_✓0 _✓O_✓p_✓t_✓i_✓o_✓n_✓s
- -m_✓c_✓p_✓u_✓-_✓t_✓y_✓p_✓e -mnumerics -msoft-float
- -mleaf-procedures -mno-leaf-procedures -mtail-call
- -mno-tail-call -mcomplex-addr -mno-complex-addr
- -mcode-align -mno-code-align -mic-compat
- -mic2.0-compat -mic3.0-compat -masm-compat
- -mintel-asm -mstrict-align -mno-strict-align
- -mold-align -mno-old-align
-
- _✓D_✓E_✓C _✓A_✓l_✓p_✓h_✓a _✓O_✓p_✓t_✓i_✓o_✓n_✓s
- -mfp-regs -mno-fp-regs -mno-soft-float -msoft-float
-
- _✓S_✓y_✓s_✓t_✓e_✓m _✓V _✓O_✓p_✓t_✓i_✓o_✓n_✓s
-
-
-
- GNU Tools 1993/10/13 4
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -G -Qy -Qn -YP,_✓p_✓a_✓t_✓h_✓s -Ym,_✓d_✓i_✓r
-
- C✓Co✓od✓de✓e G✓Ge✓en✓ne✓er✓ra✓at✓ti✓io✓on✓n O✓Op✓pt✓ti✓io✓on✓ns✓s
- -fcall-saved-_✓r_✓e_✓g -fcall-used-_✓r_✓e_✓g -ffixed-_✓r_✓e_✓g
- -finhibit-size-directive -fnonnull-objects
- -fno-common -fno-ident -fno-gnu-linker
- -fpcc-struct-return -fpic -fPIC
- -freg-struct-returno -fshared-data -fshort-enums
- -fshort-double -fvolatile -fvolatile-global
- -fverbose-asm
-
- O✓OV✓VE✓ER✓RA✓AL✓LL✓L O✓OP✓PT✓TI✓IO✓ON✓NS✓S
- -✓-x✓x _✓l_✓a_✓n_✓g_✓u_✓a_✓g_✓e
- Specify explicitly the _✓l_✓a_✓n_✓g_✓u_✓a_✓g_✓e for the following
- input files (rather than choosing a default based
- on the file name suffix) . This option applies to
- all following input files until the next `-✓-x✓x' op-
- tion. Possible values of _✓l_✓a_✓n_✓g_✓u_✓a_✓g_✓e are `c✓c',
- `o✓ob✓bj✓je✓ec✓ct✓ti✓iv✓ve✓e-✓-c✓c', `c✓c-✓-h✓he✓ea✓ad✓de✓er✓r', `c✓c+✓++✓+', `c✓cp✓pp✓p-✓-o✓ou✓ut✓tp✓pu✓ut✓t',
- `a✓as✓ss✓se✓em✓mb✓bl✓le✓er✓r', and `a✓as✓ss✓se✓em✓mb✓bl✓le✓er✓r-✓-w✓wi✓it✓th✓h-✓-c✓cp✓pp✓p'.
-
- -✓-x✓x n✓no✓on✓ne✓e
- Turn off any specification of a language, so that
- subsequent files are handled according to their
- file name suffixes (as they are if `-✓-x✓x' has not
- been used at all).
-
- If you want only some of the four stages (preprocess, com-
- pile, assemble, link), you can use `-✓-x✓x' (or filename suf-
- fixes) to tell g✓gc✓cc✓c where to start, and one of the options
- `-✓-c✓c', `-✓-S✓S', or `-✓-E✓E' to say where g✓gc✓cc✓c is to stop. Note
- that some combinations (for example, `-✓-x✓x c✓cp✓pp✓p-✓-o✓ou✓ut✓tp✓pu✓ut✓t -✓-E✓E')
- instruct g✓gc✓cc✓c to do nothing at all.
-
- -✓-c✓c Compile or assemble the source files, but do not
- link. The compiler output is an object file corre-
- sponding to each source file.
-
- By default, GCC makes the object file name for a
- source file by replacing the suffix `.✓.c✓c', `.✓.i✓i',
- `.✓.s✓s', etc., with `.✓.o✓o'. Use -✓-o✓o to select another
- name.
-
- GCC ignores any unrecognized input files (those
- that do not require compilation or assembly) with
- the -✓-c✓c option.
-
- -✓-S✓S Stop after the stage of compilation proper; do not
- assemble. The output is an assembler code file for
- each non-assembler input file specified.
-
- By default, GCC makes the assembler file name for a
- source file by replacing the suffix `.✓.c✓c', `.✓.i✓i',
- etc., with `.✓.s✓s'. Use -✓-o✓o to select another name.
-
-
-
- GNU Tools 1993/10/13 5
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- GCC ignores any input files that don't require com-
- pilation.
-
- -✓-E✓E Stop after the preprocessing stage; do not run the
- compiler proper. The output is preprocessed source
- code, which is sent to the standard output.
-
- GCC ignores input files which don't require prepro-
- cessing.
-
- -✓-o✓o _✓f_✓i_✓l_✓e
- Place output in file _✓f_✓i_✓l_✓e. This applies regardless
- to whatever sort of output GCC is producing,
- whether it be an executable file, an object file,
- an assembler file or preprocessed C code.
-
- Since only one output file can be specified, it
- does not make sense to use `-✓-o✓o' when compiling more
- than one input file, unless you are producing an
- executable file as output.
-
- If you do not specify `-✓-o✓o', the default is to put
- an executable file in `a✓a.✓.o✓ou✓ut✓t', the object file for
- `_✓s_✓o_✓u_✓r_✓c_✓e.✓._✓s_✓u_✓f_✓f_✓i_✓x' in `_✓s_✓o_✓u_✓r_✓c_✓e.✓.o✓o', its assembler file
- in `_✓s_✓o_✓u_✓r_✓c_✓e.✓.s✓s', and all preprocessed C source on
- standard output.
-
- -✓-v✓v Print (on standard error output) the commands exe-
- cuted to run the stages of compilation. Also print
- the version number of the compiler driver program
- and of the preprocessor and the compiler proper.
-
- -✓-p✓pi✓ip✓pe✓e Use pipes rather than temporary files for communi-
- cation between the various stages of compilation.
- This fails to work on some systems where the assem-
- bler cannot read from a pipe; but the GNU assembler
- has no trouble.
-
-
- L✓LA✓AN✓NG✓GU✓UA✓AG✓GE✓E O✓OP✓PT✓TI✓IO✓ON✓NS✓S
- The following options control the dialect of C that the
- compiler accepts:
-
- -✓-a✓an✓ns✓si✓i Support all ANSI standard C programs.
-
- This turns off certain features of GNU C that are
- incompatible with ANSI C, such as the a✓as✓sm✓m, i✓in✓nl✓li✓in✓ne✓e
- and t✓ty✓yp✓pe✓eo✓of✓f keywords, and predefined macros such as
- u✓un✓ni✓ix✓x and v✓va✓ax✓x that identify the type of system you
- are using. It also enables the undesirable and
- rarely used ANSI trigraph feature, and disallows
- `$✓$' as part of identifiers.
-
- The alternate keywords _✓__✓_a✓as✓sm✓m_✓__✓_, _✓__✓_e✓ex✓xt✓te✓en✓ns✓si✓io✓on✓n_✓__✓_,
-
-
-
- GNU Tools 1993/10/13 6
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- _✓__✓_i✓in✓nl✓li✓in✓ne✓e_✓__✓_ and _✓__✓_t✓ty✓yp✓pe✓eo✓of✓f_✓__✓_ continue to work despite
- `-✓-a✓an✓ns✓si✓i'. You would not want to use them in an ANSI
- C program, of course, but it is useful to put them
- in header files that might be included in compila-
- tions done with `-✓-a✓an✓ns✓si✓i'. Alternate predefined
- macros such as _✓__✓_u✓un✓ni✓ix✓x_✓__✓_ and _✓__✓_v✓va✓ax✓x_✓__✓_ are also avail-
- able, with or without `-✓-a✓an✓ns✓si✓i'.
-
- The `-✓-a✓an✓ns✓si✓i' option does not cause non-ANSI programs
- to be rejected gratuitously. For that, `-✓-p✓pe✓ed✓da✓an✓nt✓ti✓ic✓c'
- is required in addition to `-✓-a✓an✓ns✓si✓i'.
-
- The preprocessor predefines a macro _✓__✓_S✓ST✓TR✓RI✓IC✓CT✓T_✓_A✓AN✓NS✓SI✓I_✓__✓_
- when you use the `-✓-a✓an✓ns✓si✓i' option. Some header files
- may notice this macro and refrain from declaring
- certain functions or defining certain macros that
- the ANSI standard doesn't call for; this is to
- avoid interfering with any programs that might use
- these names for other things.
-
- -✓-f✓fn✓no✓o-✓-a✓as✓sm✓m
- Do not recognize a✓as✓sm✓m, i✓in✓nl✓li✓in✓ne✓e or t✓ty✓yp✓pe✓eo✓of✓f as a key-
- word. These words may then be used as identifiers.
- You can use _✓__✓_a✓as✓sm✓m_✓__✓_, _✓__✓_i✓in✓nl✓li✓in✓ne✓e_✓__✓_ and _✓__✓_t✓ty✓yp✓pe✓eo✓of✓f_✓__✓_ in-
- stead. `-✓-a✓an✓ns✓si✓i' implies `-✓-f✓fn✓no✓o-✓-a✓as✓sm✓m'.
-
- -✓-f✓fn✓no✓o-✓-b✓bu✓ui✓il✓lt✓ti✓in✓n
- Don't recognize built-in functions that do not be-
- gin with two leading underscores. Currently, the
- functions affected include _✓_e✓ex✓xi✓it✓t, a✓ab✓bo✓or✓rt✓t, a✓ab✓bs✓s, a✓al✓ll✓lo✓o-✓-
- c✓ca✓a, c✓co✓os✓s, e✓ex✓xi✓it✓t, f✓fa✓ab✓bs✓s, l✓la✓ab✓bs✓s, m✓me✓em✓mc✓cm✓mp✓p, m✓me✓em✓mc✓cp✓py✓y, s✓si✓in✓n,
- s✓sq✓qr✓rt✓t, s✓st✓tr✓rc✓cm✓mp✓p, s✓st✓tr✓rc✓cp✓py✓y, and s✓st✓tr✓rl✓le✓en✓n.
-
- The `-✓-a✓an✓ns✓si✓i' option prevents a✓al✓ll✓lo✓oc✓ca✓a and _✓_e✓ex✓xi✓it✓t from
- being builtin functions.
-
- -✓-f✓fn✓no✓o-✓-s✓st✓tr✓ri✓ic✓ct✓t-✓-p✓pr✓ro✓ot✓to✓ot✓ty✓yp✓pe✓e
- Treat a function declaration with no arguments,
- such as `i✓in✓nt✓t f✓fo✓oo✓o ();', as C would treat it--as say-
- ing nothing about the number of arguments or their
- types (C++ only). Normally, such a declaration in
- C++ means that the function f✓fo✓oo✓o takes no arguments.
-
- -✓-t✓tr✓ri✓ig✓gr✓ra✓ap✓ph✓hs✓s
- Support ANSI C trigraphs. The `-✓-a✓an✓ns✓si✓i' option im-
- plies `-✓-t✓tr✓ri✓ig✓gr✓ra✓ap✓ph✓hs✓s'.
-
- -✓-t✓tr✓ra✓ad✓di✓it✓ti✓io✓on✓na✓al✓l
- Attempt to support some aspects of traditional C
- compilers. For details, see the GNU C Manual; the
- duplicate list here has been deleted so that we
- won't get complaints when it is out of date.
-
- But one note about C++ programs only (not C).
-
-
-
- GNU Tools 1993/10/13 7
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- `-✓-t✓tr✓ra✓ad✓di✓it✓ti✓io✓on✓na✓al✓l' has one additional effect for C++:
- assignment to t✓th✓hi✓is✓s is permitted. This is the same
- as the effect of `-✓-f✓ft✓th✓hi✓is✓s-✓-i✓is✓s-✓-v✓va✓ar✓ri✓ia✓ab✓bl✓le✓e'.
-
- -✓-t✓tr✓ra✓ad✓di✓it✓ti✓io✓on✓na✓al✓l-✓-c✓cp✓pp✓p
- Attempt to support some aspects of traditional C
- preprocessors. This includes the items that
- specifically mention the preprocessor above, but
- none of the other effects of `-✓-t✓tr✓ra✓ad✓di✓it✓ti✓io✓on✓na✓al✓l'.
-
- -✓-f✓fd✓do✓ol✓ll✓la✓ar✓rs✓s-✓-i✓in✓n-✓-i✓id✓de✓en✓nt✓ti✓if✓fi✓ie✓er✓rs✓s
- Permit the use of `$✓$' in identifiers (C++ only).
- You can also use `-✓-f✓fn✓no✓o-✓-d✓do✓ol✓ll✓la✓ar✓rs✓s-✓-i✓in✓n-✓-i✓id✓de✓en✓nt✓ti✓if✓fi✓ie✓er✓rs✓s' to
- explicitly prohibit use of `$✓$'. (GNU C++ allows
- `$✓$' by default on some target systems but not oth-
- ers.)
-
- -✓-f✓fe✓en✓nu✓um✓m-✓-i✓in✓nt✓t-✓-e✓eq✓qu✓ui✓iv✓v
- Permit implicit conversion of i✓in✓nt✓t to enumeration
- types (C++ only). Normally GNU C++ allows conver-
- sion of e✓en✓nu✓um✓m to i✓in✓nt✓t, but not the other way around.
-
- -✓-f✓fe✓ex✓xt✓te✓er✓rn✓na✓al✓l-✓-t✓te✓em✓mp✓pl✓la✓at✓te✓es✓s
- Produce smaller code for template declarations, by
- generating only a single copy of each template
- function where it is defined (C++ only). To use
- this option successfully, you must also mark all
- files that use templates with either `#✓#p✓pr✓ra✓ag✓gm✓ma✓a
- i✓im✓mp✓pl✓le✓em✓me✓en✓nt✓ta✓at✓ti✓io✓on✓n' (the definition) or `#✓#p✓pr✓ra✓ag✓gm✓ma✓a
- i✓in✓nt✓te✓er✓rf✓fa✓ac✓ce✓e' (declarations).
-
- When your code is compiled with
- `-✓-f✓fe✓ex✓xt✓te✓er✓rn✓na✓al✓l-✓-t✓te✓em✓mp✓pl✓la✓at✓te✓es✓s', all template instantiations
- are external. You must arrange for all necessary
- instantiations to appear in the implementation
- file; you can do this with a t✓ty✓yp✓pe✓ed✓de✓ef✓f that refer-
- ences each instantiation needed. Conversely, when
- you compile using the default option
- `-✓-f✓fn✓no✓o-✓-e✓ex✓xt✓te✓er✓rn✓na✓al✓l-✓-t✓te✓em✓mp✓pl✓la✓at✓te✓es✓s', all template instantia-
- tions are explicitly internal.
-
- -✓-f✓fa✓al✓ll✓l-✓-v✓vi✓ir✓rt✓tu✓ua✓al✓l
- Treat all possible member functions as virtual, im-
- plicitly. All member functions (except for con-
- structor functions and n✓ne✓ew✓w or d✓de✓el✓le✓et✓te✓e member opera-
- tors) are treated as virtual functions of the class
- where they appear.
-
- This does not mean that all calls to these member
- functions will be made through the internal table
- of virtual functions. Under some circumstances,
- the compiler can determine that a call to a given
- virtual function can be made directly; in these
- cases the calls are direct in any case.
-
-
-
- GNU Tools 1993/10/13 8
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-f✓fc✓co✓on✓nd✓d-✓-m✓mi✓is✓sm✓ma✓at✓tc✓ch✓h
- Allow conditional expressions with mismatched types
- in the second and third arguments. The value of
- such an expression is void.
-
- -✓-f✓ft✓th✓hi✓is✓s-✓-i✓is✓s-✓-v✓va✓ar✓ri✓ia✓ab✓bl✓le✓e
- Permit assignment to t✓th✓hi✓is✓s (C++ only). The incorpo-
- ration of user-defined free store management into
- C++ has made assignment to `t✓th✓hi✓is✓s' an anachronism.
- Therefore, by default it is invalid to assign to
- t✓th✓hi✓is✓s within a class member function. However, for
- backwards compatibility, you can make it valid with
- `-✓-f✓ft✓th✓hi✓is✓s-✓-i✓is✓s-✓-v✓va✓ar✓ri✓ia✓ab✓bl✓le✓e'.
-
- -✓-f✓fu✓un✓ns✓si✓ig✓gn✓ne✓ed✓d-✓-c✓ch✓ha✓ar✓r
- Let the type c✓ch✓ha✓ar✓r be unsigned, like u✓un✓ns✓si✓ig✓gn✓ne✓ed✓d c✓ch✓ha✓ar✓r.
-
- Each kind of machine has a default for what c✓ch✓ha✓ar✓r
- should be. It is either like u✓un✓ns✓si✓ig✓gn✓ne✓ed✓d c✓ch✓ha✓ar✓r by de-
- fault or like s✓si✓ig✓gn✓ne✓ed✓d c✓ch✓ha✓ar✓r by default.
-
- Ideally, a portable program should always use
- s✓si✓ig✓gn✓ne✓ed✓d c✓ch✓ha✓ar✓r or u✓un✓ns✓si✓ig✓gn✓ne✓ed✓d c✓ch✓ha✓ar✓r when it depends on the
- signedness of an object. But many programs have
- been written to use plain c✓ch✓ha✓ar✓r and expect it to be
- signed, or expect it to be unsigned, depending on
- the machines they were written for. This option,
- and its inverse, let you make such a program work
- with the opposite default.
-
- The type c✓ch✓ha✓ar✓r is always a distinct type from each
- of s✓si✓ig✓gn✓ne✓ed✓d c✓ch✓ha✓ar✓r and u✓un✓ns✓si✓ig✓gn✓ne✓ed✓d c✓ch✓ha✓ar✓r, even though its
- behavior is always just like one of those two.
-
- -✓-f✓fs✓si✓ig✓gn✓ne✓ed✓d-✓-c✓ch✓ha✓ar✓r
- Let the type c✓ch✓ha✓ar✓r be signed, like s✓si✓ig✓gn✓ne✓ed✓d c✓ch✓ha✓ar✓r.
-
- Note that this is equivalent to
- `-✓-f✓fn✓no✓o-✓-u✓un✓ns✓si✓ig✓gn✓ne✓ed✓d-✓-c✓ch✓ha✓ar✓r', which is the negative form of
- `-✓-f✓fu✓un✓ns✓si✓ig✓gn✓ne✓ed✓d-✓-c✓ch✓ha✓ar✓r'. Likewise, `-✓-f✓fn✓no✓o-✓-s✓si✓ig✓gn✓ne✓ed✓d-✓-c✓ch✓ha✓ar✓r' is
- equivalent to `-✓-f✓fu✓un✓ns✓si✓ig✓gn✓ne✓ed✓d-✓-c✓ch✓ha✓ar✓r'.
-
- -✓-f✓fs✓si✓ig✓gn✓ne✓ed✓d-✓-b✓bi✓it✓tf✓fi✓ie✓el✓ld✓ds✓s
-
- -✓-f✓fu✓un✓ns✓si✓ig✓gn✓ne✓ed✓d-✓-b✓bi✓it✓tf✓fi✓ie✓el✓ld✓ds✓s
-
- -✓-f✓fn✓no✓o-✓-s✓si✓ig✓gn✓ne✓ed✓d-✓-b✓bi✓it✓tf✓fi✓ie✓el✓ld✓ds✓s
-
- -✓-f✓fn✓no✓o-✓-u✓un✓ns✓si✓ig✓gn✓ne✓ed✓d-✓-b✓bi✓it✓tf✓fi✓ie✓el✓ld✓ds✓s
- These options control whether a bitfield is signed
- or unsigned, when declared with no explicit
- `s✓si✓ig✓gn✓ne✓ed✓d' or `u✓un✓ns✓si✓ig✓gn✓ne✓ed✓d' qualifier. By default, such
- a bitfield is signed, because this is consistent:
- the basic integer types such as i✓in✓nt✓t are signed
-
-
-
- GNU Tools 1993/10/13 9
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- types.
-
- However, when you specify `-✓-t✓tr✓ra✓ad✓di✓it✓ti✓io✓on✓na✓al✓l', bitfields
- are all unsigned no matter what.
-
- -✓-f✓fw✓wr✓ri✓it✓ta✓ab✓bl✓le✓e-✓-s✓st✓tr✓ri✓in✓ng✓gs✓s
- Store string constants in the writable data segment
- and don't uniquize them. This is for compatibility
- with old programs which assume they can write into
- string constants. `-✓-t✓tr✓ra✓ad✓di✓it✓ti✓io✓on✓na✓al✓l' also has this ef-
- fect.
-
- Writing into string constants is a very bad idea;
- "constants" should be constant.
-
- P✓PR✓RE✓EP✓PR✓RO✓OC✓CE✓ES✓SS✓SO✓OR✓R O✓OP✓PT✓TI✓IO✓ON✓NS✓S
- These options control the C preprocessor, which is run on
- each C source file before actual compilation.
-
- If you use the `-✓-E✓E' option, GCC does nothing except pre-
- processing. Some of these options make sense only togeth-
- er with `-✓-E✓E' because they cause the preprocessor output to
- be unsuitable for actual compilation.
-
- -✓-i✓in✓nc✓cl✓lu✓ud✓de✓e _✓f_✓i_✓l_✓e
- Process _✓f_✓i_✓l_✓e as input before processing the regular
- input file. In effect, the contents of _✓f_✓i_✓l_✓e are
- compiled first. Any `-✓-D✓D' and `-✓-U✓U' options on the
- command line are always processed before `-✓-i✓in✓nc✓cl✓lu✓ud✓de✓e
- _✓f_✓i_✓l_✓e', regardless of the order in which they are
- written. All the `-✓-i✓in✓nc✓cl✓lu✓ud✓de✓e' and `-✓-i✓im✓ma✓ac✓cr✓ro✓os✓s' options
- are processed in the order in which they are writ-
- ten.
-
- -✓-i✓im✓ma✓ac✓cr✓ro✓os✓s _✓f_✓i_✓l_✓e
- Process _✓f_✓i_✓l_✓e as input, discarding the resulting
- output, before processing the regular input file.
- Because the output generated from _✓f_✓i_✓l_✓e is discard-
- ed, the only effect of `-✓-i✓im✓ma✓ac✓cr✓ro✓os✓s _✓f_✓i_✓l_✓e' is to make
- the macros defined in _✓f_✓i_✓l_✓e available for use in the
- main input. The preprocessor evaluates any `-✓-D✓D'
- and `-✓-U✓U' options on the command line before pro-
- cessing `-✓-i✓im✓ma✓ac✓cr✓ro✓os✓s_✓f_✓i_✓l_✓e', regardless of the order in
- which they are written. All the `-✓-i✓in✓nc✓cl✓lu✓ud✓de✓e' and
- `-✓-i✓im✓ma✓ac✓cr✓ro✓os✓s' options are processed in the order in
- which they are written.
-
- -✓-i✓id✓di✓ir✓ra✓af✓ft✓te✓er✓r _✓d_✓i_✓r
- Add the directory _✓d_✓i_✓r to the second include path.
- The directories on the second include path are
- searched when a header file is not found in any of
- the directories in the main include path (the one
- that `-✓-I✓I' adds to).
-
-
-
-
- GNU Tools 1993/10/13 10
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-i✓ip✓pr✓re✓ef✓fi✓ix✓x _✓p_✓r_✓e_✓f_✓i_✓x
- Specify _✓p_✓r_✓e_✓f_✓i_✓x as the prefix for subsequent
- `-✓-i✓iw✓wi✓it✓th✓hp✓pr✓re✓ef✓fi✓ix✓x' options.
-
- -✓-i✓iw✓wi✓it✓th✓hp✓pr✓re✓ef✓fi✓ix✓x _✓d_✓i_✓r
- Add a directory to the second include path. The
- directory's name is made by concatenating _✓p_✓r_✓e_✓f_✓i_✓x
- and _✓d_✓i_✓r, where _✓p_✓r_✓e_✓f_✓i_✓x was specified previously with
- `-✓-i✓ip✓pr✓re✓ef✓fi✓ix✓x'.
-
- -✓-n✓no✓os✓st✓td✓di✓in✓nc✓c
- Do not search the standard system directories for
- header files. Only the directories you have speci-
- fied with `-✓-I✓I' options (and the current directory,
- if appropriate) are searched.
-
- By using both `-✓-n✓no✓os✓st✓td✓di✓in✓nc✓c' and `-✓-I✓I-✓-', you can limit
- the include-file search file to only those directo-
- ries you specify explicitly.
-
- -✓-n✓no✓os✓st✓td✓di✓in✓nc✓c+✓++✓+
- Do not search for header files in the C++-specific
- standard directories, but do still search the other
- standard directories. (This option is used when
- building `l✓li✓ib✓bg✓g+✓++✓+'.)
-
- -✓-u✓un✓nd✓de✓ef✓f Do not predefine any nonstandard macros. (Includ-
- ing architecture flags).
-
- -✓-E✓E Run only the C preprocessor. Preprocess all the C
- source files specified and output the results to
- standard output or to the specified output file.
-
- -✓-C✓C Tell the preprocessor not to discard comments.
- Used with the `-✓-E✓E' option.
-
- -✓-P✓P Tell the preprocessor not to generate `#✓#l✓li✓in✓ne✓e' com-
- mands. Used with the `-✓-E✓E' option.
-
- -✓-M✓M [✓[ -✓-M✓MG✓G ]✓]
- Tell the preprocessor to output a rule suitable for
- m✓ma✓ak✓ke✓e describing the dependencies of each object
- file. For each source file, the preprocessor out-
- puts one m✓ma✓ak✓ke✓e-rule whose target is the object file
- name for that source file and whose dependencies
- are all the files `#✓#i✓in✓nc✓cl✓lu✓ud✓de✓e'd in it. This rule may
- be a single line or may be continued with `\✓\'-new-
- line if it is long. The list of rules is printed
- on standard output instead of the preprocessed C
- program.
-
- `-✓-M✓M' implies `-✓-E✓E'.
-
- `-✓-M✓MG✓G' says to treat missing header files as gener-
-
-
-
- GNU Tools 1993/10/13 11
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- ated files and assume they live in the same direc-
- tory as the source file. It must be specified in
- addition to `-✓-M✓M'.
-
- -✓-M✓MM✓M [✓[ -✓-M✓MG✓G ]✓]
- Like `-✓-M✓M' but the output mentions only the user
- header files included with `#✓#i✓in✓nc✓cl✓lu✓ud✓de✓e _✓f_✓i_✓l_✓e"'. Sys-
- tem header files included with `#✓#i✓in✓nc✓cl✓lu✓ud✓de✓e <✓<_✓f_✓i_✓l_✓e>'
- are omitted.
-
- -✓-M✓MD✓D Like `-✓-M✓M' but the dependency information is written
- to files with names made by replacing `.✓.o✓o' with
- `.✓.d✓d' at the end of the output file names. This is
- in addition to compiling the file as
- specified--`-✓-M✓MD✓D' does not inhibit ordinary compila-
- tion the way `-✓-M✓M' does.
-
- The Mach utility `m✓md✓d' can be used to merge the `.✓.d✓d'
- files into a single dependency file suitable for
- using with the `m✓ma✓ak✓ke✓e' command.
-
- -✓-M✓MM✓MD✓D Like `-✓-M✓MD✓D' except mention only user header files,
- not system header files.
-
- -✓-H✓H Print the name of each header file used, in addi-
- tion to other normal activities.
-
- -✓-A✓A_✓q_✓u_✓e_✓s_✓t_✓i_✓o_✓n(✓(_✓a_✓n_✓s_✓w_✓e_✓r)✓)
- Assert the answer _✓a_✓n_✓s_✓w_✓e_✓r for _✓q_✓u_✓e_✓s_✓t_✓i_✓o_✓n, in case it
- is tested with a preprocessor conditional such as
- `#✓#i✓if✓f #✓#_✓q_✓u_✓e_✓s_✓t_✓i_✓o_✓n(✓(_✓a_✓n_✓s_✓w_✓e_✓r)✓)'. `-✓-A✓A-✓-' disables the stan-
- dard assertions that normally describe the target
- machine.
-
- -✓-A✓A_✓q_✓u_✓e_✓s_✓t_✓i_✓o_✓n
- (_✓a_✓n_✓s_✓w_✓e_✓r) Assert the answer _✓a_✓n_✓s_✓w_✓e_✓r for _✓q_✓u_✓e_✓s_✓t_✓i_✓o_✓n, in
- case it is tested with a preprocessor conditional
- such as `#✓#i✓if✓f #_✓q_✓u_✓e_✓s_✓t_✓i_✓o_✓n(_✓a_✓n_✓s_✓w_✓e_✓r)'. `-✓-A✓A-✓-' disables
- the standard assertions that normally describe the
- target machine.
-
- -✓-D✓D_✓m_✓a_✓c_✓r_✓o
- Define macro _✓m_✓a_✓c_✓r_✓o with the string `1✓1' as its defi-
- nition.
-
- -✓-D✓D_✓m_✓a_✓c_✓r_✓o=✓=_✓d_✓e_✓f_✓n
- Define macro _✓m_✓a_✓c_✓r_✓o as _✓d_✓e_✓f_✓n. All instances of
- `-✓-D✓D' on the command line are processed before any
- `-✓-U✓U' options.
-
- -✓-U✓U_✓m_✓a_✓c_✓r_✓o
- Undefine macro _✓m_✓a_✓c_✓r_✓o. `-✓-U✓U' options are evaluated
- after all `-✓-D✓D' options, but before any `-✓-i✓in✓nc✓cl✓lu✓ud✓de✓e'
- and `-✓-i✓im✓ma✓ac✓cr✓ro✓os✓s' options.
-
-
-
- GNU Tools 1993/10/13 12
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-d✓dM✓M Tell the preprocessor to output only a list of the
- macro definitions that are in effect at the end of
- preprocessing. Used with the `-✓-E✓E' option.
-
- -✓-d✓dD✓D Tell the preprocessor to pass all macro definitions
- into the output, in their proper sequence in the
- rest of the output.
-
- -✓-d✓dN✓N Like `-✓-d✓dD✓D' except that the macro arguments and con-
- tents are omitted. Only `#✓#d✓de✓ef✓fi✓in✓ne✓e _✓n_✓a_✓m_✓e' is included
- in the output.
-
- A✓AS✓SS✓SE✓EM✓MB✓BL✓LE✓ER✓R O✓OP✓PT✓TI✓IO✓ON✓N
- -✓-W✓Wa✓a,✓,_✓o_✓p_✓t_✓i_✓o_✓n
- Pass _✓o_✓p_✓t_✓i_✓o_✓n as an option to the assembler. If _✓o_✓p_✓-
- _✓t_✓i_✓o_✓n contains commas, it is split into multiple op-
- tions at the commas.
-
- L✓LI✓IN✓NK✓KE✓ER✓R O✓OP✓PT✓TI✓IO✓ON✓NS✓S
- These options come into play when the compiler links ob-
- ject files into an executable output file. They are mean-
- ingless if the compiler is not doing a link step.
-
- _✓o_✓b_✓j_✓e_✓c_✓t_✓-_✓f_✓i_✓l_✓e_✓-_✓n_✓a_✓m_✓e
- A file name that does not end in a special recog-
- nized suffix is considered to name an object file
- or library. (Object files are distinguished from
- libraries by the linker according to the file con-
- tents.) If GCC does a link step, these object
- files are used as input to the linker.
-
- -✓-l✓l_✓l_✓i_✓b_✓r_✓a_✓r_✓y
- Use the library named _✓l_✓i_✓b_✓r_✓a_✓r_✓y when linking.
-
- The linker searches a standard list of directories
- for the library, which is actually a file named
- `l✓li✓ib✓b_✓l_✓i_✓b_✓r_✓a_✓r_✓y.a'. The linker then uses this file as
- if it had been specified precisely by name.
-
- The directories searched include several standard
- system directories plus any that you specify with
- `-✓-L✓L'.
-
- Normally the files found this way are library
- files--archive files whose members are object
- files. The linker handles an archive file by scan-
- ning through it for members which define symbols
- that have so far been referenced but not defined.
- However, if the linker finds an ordinary object
- file rather than a library, the object file is
- linked in the usual fashion. The only difference
- between using an `-✓-l✓l' option and specifying a file
- name is that `-✓-l✓l' surrounds _✓l_✓i_✓b_✓r_✓a_✓r_✓y with `l✓li✓ib✓b' and
- `.✓.a✓a' and searches several directories.
-
-
-
- GNU Tools 1993/10/13 13
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-l✓lo✓ob✓bj✓jc✓c You need this special case of the -✓-l✓l option in or-
- der to link an Objective C program.
-
- -✓-n✓no✓os✓st✓ta✓ar✓rt✓tf✓fi✓il✓le✓es✓s
- Do not use the standard system startup files when
- linking. The standard libraries are used normally.
-
- -✓-n✓no✓os✓st✓td✓dl✓li✓ib✓b
- Don't use the standard system libraries and startup
- files when linking. Only the files you specify
- will be passed to the linker.
-
- -✓-s✓st✓ta✓at✓ti✓ic✓c
- On systems that support dynamic linking, this pre-
- vents linking with the shared libraries. On other
- systems, this option has no effect.
-
- -✓-s✓sh✓ha✓ar✓re✓ed✓d
- Produce a shared object which can then be linked
- with other objects to form an executable. Only a
- few systems support this option.
-
- -✓-s✓sy✓ym✓mb✓bo✓ol✓li✓ic✓c
- Bind references to global symbols when building a
- shared object. Warn about any unresolved refer-
- ences (unless overridden by the link editor option
- `-✓-X✓Xl✓li✓in✓nk✓ke✓er✓r -✓-z✓z -✓-X✓Xl✓li✓in✓nk✓ke✓er✓r d✓de✓ef✓fs✓s'). Only a few systems
- support this option.
-
- -✓-X✓Xl✓li✓in✓nk✓ke✓er✓r _✓o_✓p_✓t_✓i_✓o_✓n
- Pass _✓o_✓p_✓t_✓i_✓o_✓n as an option to the linker. You can
- use this to supply system-specific linker options
- which GNU CC does not know how to recognize.
-
- If you want to pass an option that takes an argu-
- ment, you must use `-✓-X✓Xl✓li✓in✓nk✓ke✓er✓r' twice, once for the
- option and once for the argument. For example, to
- pass `-✓-a✓as✓ss✓se✓er✓rt✓t d✓de✓ef✓fi✓in✓ni✓it✓ti✓io✓on✓ns✓s', you must write `-✓-X✓Xl✓li✓in✓nk✓k-✓-
- e✓er✓r -✓-a✓as✓ss✓se✓er✓rt✓t -✓-X✓Xl✓li✓in✓nk✓ke✓er✓r d✓de✓ef✓fi✓in✓ni✓it✓ti✓io✓on✓ns✓s'. It does not work
- to write `-✓-X✓Xl✓li✓in✓nk✓ke✓er✓r "✓"-✓-a✓as✓ss✓se✓er✓rt✓t d✓de✓ef✓fi✓in✓ni✓it✓ti✓io✓on✓ns✓s"✓"', because
- this passes the entire string as a single argument,
- which is not what the linker expects.
-
- -✓-W✓Wl✓l,✓,_✓o_✓p_✓t_✓i_✓o_✓n
- Pass _✓o_✓p_✓t_✓i_✓o_✓n as an option to the linker. If _✓o_✓p_✓t_✓i_✓o_✓n
- contains commas, it is split into multiple options
- at the commas.
-
- -✓-u✓u _✓s_✓y_✓m_✓b_✓o_✓l
- Pretend the symbol _✓s_✓y_✓m_✓b_✓o_✓l is undefined, to force
- linking of library modules to define it. You can
- use `-✓-u✓u' multiple times with different symbols to
- force loading of additional library modules.
-
-
-
-
- GNU Tools 1993/10/13 14
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- D✓DI✓IR✓RE✓EC✓CT✓TO✓OR✓RY✓Y O✓OP✓PT✓TI✓IO✓ON✓NS✓S
- These options specify directories to search for header
- files, for libraries and for parts of the compiler:
-
- -✓-I✓I_✓d_✓i_✓r Append directory _✓d_✓i_✓r to the list of directories
- searched for include files.
-
- -✓-I✓I-✓- Any directories you specify with `-✓-I✓I' options be-
- fore the `-✓-I✓I-✓-' option are searched only for the
- case of `#✓#i✓in✓nc✓cl✓lu✓ud✓de✓e "✓"_✓f_✓i_✓l_✓e"✓"'; they are not searched
- for `#✓#i✓in✓nc✓cl✓lu✓ud✓de✓e <✓<_✓f_✓i_✓l_✓e>'.
-
- If additional directories are specified with `-✓-I✓I'
- options after the `-✓-I✓I-✓-', these directories are
- searched for all `#✓#i✓in✓nc✓cl✓lu✓ud✓de✓e' directives. (Ordinari-
- ly _✓a_✓l_✓l `-✓-I✓I' directories are used this way.)
-
- In addition, the `-✓-I✓I-✓-' option inhibits the use of
- the current directory (where the current input file
- came from) as the first search directory for `#✓#i✓in✓n-✓-
- c✓cl✓lu✓ud✓de✓e "✓"_✓f_✓i_✓l_✓e"✓"'. There is no way to override this
- effect of `-✓-I✓I-✓-'. With `-✓-I✓I.✓.' you can specify
- searching the directory which was current when the
- compiler was invoked. That is not exactly the same
- as what the preprocessor does by default, but it is
- often satisfactory.
-
- `-✓-I✓I-✓-' does not inhibit the use of the standard sys-
- tem directories for header files. Thus, `-✓-I✓I-✓-' and
- `-✓-n✓no✓os✓st✓td✓di✓in✓nc✓c' are independent.
-
- -✓-L✓L_✓d_✓i_✓r Add directory _✓d_✓i_✓r to the list of directories to be
- searched for `-✓-l✓l'.
-
- -✓-B✓B_✓p_✓r_✓e_✓f_✓i_✓x
- This option specifies where to find the executa-
- bles, libraries and data files of the compiler it-
- self.
-
- The compiler driver program runs one or more of the
- subprograms `c✓cp✓pp✓p', `c✓cc✓c1✓1' (or, for C++, `c✓cc✓c1✓1p✓pl✓lu✓us✓s'),
- `a✓as✓s' and `l✓ld✓d'. It tries _✓p_✓r_✓e_✓f_✓i_✓x as a prefix for
- each program it tries to run, both with and without
- `_✓m_✓a_✓c_✓h_✓i_✓n_✓e/✓/_✓v_✓e_✓r_✓s_✓i_✓o_✓n/✓/'.
-
- For each subprogram to be run, the compiler driver
- first tries the `-✓-B✓B' prefix, if any. If that name
- is not found, or if `-✓-B✓B' was not specified, the
- driver tries two standard prefixes, which are
- `/✓/u✓us✓sr✓r/✓/l✓li✓ib✓b/✓/g✓gc✓cc✓c/✓/' and `/✓/u✓us✓sr✓r/✓/l✓lo✓oc✓ca✓al✓l/✓/l✓li✓ib✓b/✓/g✓gc✓cc✓c-✓-l✓li✓ib✓b/✓/'. If
- neither of those results in a file name that is
- found, the compiler driver searches for the unmodi-
- fied program name, using the directories specified
- in your `P✓PA✓AT✓TH✓H' environment variable.
-
-
-
- GNU Tools 1993/10/13 15
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- The run-time support file `l✓li✓ib✓bg✓gc✓cc✓c.✓.a✓a' is also
- searched for using the `-✓-B✓B' prefix, if needed. If
- it is not found there, the two standard prefixes
- above are tried, and that is all. The file is left
- out of the link if it is not found by those means.
- Most of the time, on most machines, `l✓li✓ib✓bg✓gc✓cc✓c.✓.a✓a' is
- not actually necessary.
-
- You can get a similar result from the environment
- variable G✓GC✓CC✓C_✓_E✓EX✓XE✓EC✓C_✓_P✓PR✓RE✓EF✓FI✓IX✓X; if it is defined, its
- value is used as a prefix in the same way. If both
- the `-✓-B✓B' option and the G✓GC✓CC✓C_✓_E✓EX✓XE✓EC✓C_✓_P✓PR✓RE✓EF✓FI✓IX✓X variable
- are present, the `-✓-B✓B' option is used first and the
- environment variable value second.
-
- W✓WA✓AR✓RN✓NI✓IN✓NG✓G O✓OP✓PT✓TI✓IO✓ON✓NS✓S
- Warnings are diagnostic messages that report constructions
- which are not inherently erroneous but which are risky or
- suggest there may have been an error.
-
- These options control the amount and kinds of warnings
- produced by GNU CC:
-
- -✓-f✓fs✓sy✓yn✓nt✓ta✓ax✓x-✓-o✓on✓nl✓ly✓y
- Check the code for syntax errors, but don't emit
- any output.
-
- -✓-w✓w Inhibit all warning messages.
-
- -✓-W✓Wn✓no✓o-✓-i✓im✓mp✓po✓or✓rt✓t
- Inhibit warning messages about the use of #✓#i✓im✓mp✓po✓or✓rt✓t.
-
- -✓-p✓pe✓ed✓da✓an✓nt✓ti✓ic✓c
- Issue all the warnings demanded by strict ANSI
- standard C; reject all programs that use forbidden
- extensions.
-
- Valid ANSI standard C programs should compile prop-
- erly with or without this option (though a rare few
- will require `-✓-a✓an✓ns✓si✓i'). However, without this op-
- tion, certain GNU extensions and traditional C fea-
- tures are supported as well. With this option,
- they are rejected. There is no reason to _✓u_✓s_✓e this
- option; it exists only to satisfy pedants.
-
- `-✓-p✓pe✓ed✓da✓an✓nt✓ti✓ic✓c' does not cause warning messages for use
- of the alternate keywords whose names begin and end
- with `_✓__✓_'. Pedantic warnings are also disabled in
- the expression that follows _✓__✓_e✓ex✓xt✓te✓en✓ns✓si✓io✓on✓n_✓__✓_. Howev-
- er, only system header files should use these es-
- cape routes; application programs should avoid
- them.
-
-
-
-
-
- GNU Tools 1993/10/13 16
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-p✓pe✓ed✓da✓an✓nt✓ti✓ic✓c-✓-e✓er✓rr✓ro✓or✓rs✓s
- Like `-✓-p✓pe✓ed✓da✓an✓nt✓ti✓ic✓c', except that errors are produced
- rather than warnings.
-
- -✓-W✓W Print extra warning messages for these events:
-
- +✓o A nonvolatile automatic variable might be changed
- by a call to l✓lo✓on✓ng✓gj✓jm✓mp✓p. These warnings are possible
- only in optimizing compilation.
-
- The compiler sees only the calls to s✓se✓et✓tj✓jm✓mp✓p. It
- cannot know where l✓lo✓on✓ng✓gj✓jm✓mp✓p will be called; in fact,
- a signal handler could call it at any point in the
- code. As a result, you may get a warning even when
- there is in fact no problem because l✓lo✓on✓ng✓gj✓jm✓mp✓p cannot
- in fact be called at the place which would cause a
- problem.
-
- +✓o A function can return either with or without a val-
- ue. (Falling off the end of the function body is
- considered returning without a value.) For exam-
- ple, this function would evoke such a warning:
-
- foo (a)
- {
- if (a > 0)
- return a;
- }
-
- Spurious warnings can occur because GNU CC does not
- realize that certain functions (including a✓ab✓bo✓or✓rt✓t and
- l✓lo✓on✓ng✓gj✓jm✓mp✓p) will never return.
-
- +✓o An expression-statement contains no side effects.
-
- +✓o An unsigned value is compared against zero with `>✓>'
- or `<✓<=✓='.
-
-
- -✓-W✓Wi✓im✓mp✓pl✓li✓ic✓ci✓it✓t
- Warn whenever a function or parameter is implicitly
- declared.
-
- -✓-W✓Wr✓re✓et✓tu✓ur✓rn✓n-✓-t✓ty✓yp✓pe✓e
- Warn whenever a function is defined with a return-
- type that defaults to i✓in✓nt✓t. Also warn about any r✓re✓e-✓-
- t✓tu✓ur✓rn✓n statement with no return-value in a function
- whose return-type is not v✓vo✓oi✓id✓d.
-
- -✓-W✓Wu✓un✓nu✓us✓se✓ed✓d
- Warn whenever a local variable is unused aside from
- its declaration, whenever a function is declared
- static but never defined, and whenever a statement
- computes a result that is explicitly not used.
-
-
-
- GNU Tools 1993/10/13 17
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-W✓Ws✓sw✓wi✓it✓tc✓ch✓h
- Warn whenever a s✓sw✓wi✓it✓tc✓ch✓h statement has an index of
- enumeral type and lacks a c✓ca✓as✓se✓e for one or more of
- the named codes of that enumeration. (The presence
- of a d✓de✓ef✓fa✓au✓ul✓lt✓t label prevents this warning.) c✓ca✓as✓se✓e
- labels outside the enumeration range also provoke
- warnings when this option is used.
-
- -✓-W✓Wc✓co✓om✓mm✓me✓en✓nt✓t
- Warn whenever a comment-start sequence `/✓/*✓*' appears
- in a comment.
-
- -✓-W✓Wt✓tr✓ri✓ig✓gr✓ra✓ap✓ph✓hs✓s
- Warn if any trigraphs are encountered (assuming
- they are enabled).
-
- -✓-W✓Wf✓fo✓or✓rm✓ma✓at✓t
- Check calls to p✓pr✓ri✓in✓nt✓tf✓f and s✓sc✓ca✓an✓nf✓f, etc., to make sure
- that the arguments supplied have types appropriate
- to the format string specified.
-
- -✓-W✓Wc✓ch✓ha✓ar✓r-✓-s✓su✓ub✓bs✓sc✓cr✓ri✓ip✓pt✓ts✓s
- Warn if an array subscript has type c✓ch✓ha✓ar✓r. This is
- a common cause of error, as programmers often for-
- get that this type is signed on some machines.
-
- -✓-W✓Wu✓un✓ni✓in✓ni✓it✓ti✓ia✓al✓li✓iz✓ze✓ed✓d
- An automatic variable is used without first being
- initialized.
-
- These warnings are possible only in optimizing com-
- pilation, because they require data flow informa-
- tion that is computed only when optimizing. If you
- don't specify `-✓-O✓O', you simply won't get these
- warnings.
-
- These warnings occur only for variables that are
- candidates for register allocation. Therefore,
- they do not occur for a variable that is declared
- v✓vo✓ol✓la✓at✓ti✓il✓le✓e, or whose address is taken, or whose size
- is other than 1, 2, 4 or 8 bytes. Also, they do
- not occur for structures, unions or arrays, even
- when they are in registers.
-
- Note that there may be no warning about a variable
- that is used only to compute a value that itself is
- never used, because such computations may be delet-
- ed by data flow analysis before the warnings are
- printed.
-
- These warnings are made optional because GNU CC is
- not smart enough to see all the reasons why the
- code might be correct despite appearing to have an
- error. Here is one example of how this can happen:
-
-
-
- GNU Tools 1993/10/13 18
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- {
- int x;
- switch (y)
- {
- case 1: x = 1;
- break;
- case 2: x = 4;
- break;
- case 3: x = 5;
- }
- foo (x);
- }
-
- If the value of y✓y is always 1, 2 or 3, then x✓x is
- always initialized, but GNU CC doesn't know this.
- Here is another common case:
-
- {
- int save_y;
- if (change_y) save_y = y, y = new_y;
- ...
- if (change_y) y = save_y;
- }
-
- This has no bug because s✓sa✓av✓ve✓e_✓_y✓y is used only if it
- is set.
-
- Some spurious warnings can be avoided if you de-
- clare as v✓vo✓ol✓la✓at✓ti✓il✓le✓e all the functions you use that
- never return.
-
- -✓-W✓Wp✓pa✓ar✓re✓en✓nt✓th✓he✓es✓se✓es✓s
- Warn if parentheses are omitted in certain con-
- texts.
-
- -✓-W✓Wt✓te✓em✓mp✓pl✓la✓at✓te✓e-✓-d✓de✓eb✓bu✓ug✓gg✓gi✓in✓ng✓g
- When using templates in a C++ program, warn if de-
- bugging is not yet fully available (C++ only).
-
- -✓-W✓Wa✓al✓ll✓l All of the above `-✓-W✓W' options combined. These are
- all the options which pertain to usage that we rec-
- ommend avoiding and that we believe is easy to
- avoid, even in conjunction with macros.
-
- The remaining `-✓-W✓W.✓..✓..✓.' options are not implied by `-✓-W✓Wa✓al✓ll✓l'
- because they warn about constructions that we consider
- reasonable to use, on occasion, in clean programs.
-
- -✓-W✓Wt✓tr✓ra✓ad✓di✓it✓ti✓io✓on✓na✓al✓l
- Warn about certain constructs that behave differ-
- ently in traditional and ANSI C.
-
- +✓o Macro arguments occurring within string constants
- in the macro body. These would substitute the ar-
-
-
-
- GNU Tools 1993/10/13 19
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- gument in traditional C, but are part of the con-
- stant in ANSI C.
-
- +✓o A function declared external in one block and then
- used after the end of the block.
-
- +✓o A s✓sw✓wi✓it✓tc✓ch✓h statement has an operand of type l✓lo✓on✓ng✓g.
-
-
- -✓-W✓Ws✓sh✓ha✓ad✓do✓ow✓w
- Warn whenever a local variable shadows another lo-
- cal variable.
-
- -✓-W✓Wi✓id✓d-✓-c✓cl✓la✓as✓sh✓h-✓-_✓l_✓e_✓n
- Warn whenever two distinct identifiers match in the
- first _✓l_✓e_✓n characters. This may help you prepare a
- program that will compile with certain obsolete,
- brain-damaged compilers.
-
- -✓-W✓Wp✓po✓oi✓in✓nt✓te✓er✓r-✓-a✓ar✓ri✓it✓th✓h
- Warn about anything that depends on the "size of" a
- function type or of v✓vo✓oi✓id✓d. GNU C assigns these
- types a size of 1, for convenience in calculations
- with v✓vo✓oi✓id✓d *✓* pointers and pointers to functions.
-
- -✓-W✓Wc✓ca✓as✓st✓t-✓-q✓qu✓ua✓al✓l
- Warn whenever a pointer is cast so as to remove a
- type qualifier from the target type. For example,
- warn if a c✓co✓on✓ns✓st✓t c✓ch✓ha✓ar✓r *✓* is cast to an ordinary c✓ch✓ha✓ar✓r
- *✓*.
-
- -✓-W✓Wc✓ca✓as✓st✓t-✓-a✓al✓li✓ig✓gn✓n
- Warn whenever a pointer is cast such that the re-
- quired alignment of the target is increased. For
- example, warn if a c✓ch✓ha✓ar✓r *✓* is cast to an i✓in✓nt✓t *✓* on
- machines where integers can only be accessed at
- two- or four-byte boundaries.
-
- -✓-W✓Ww✓wr✓ri✓it✓te✓e-✓-s✓st✓tr✓ri✓in✓ng✓gs✓s
- Give string constants the type c✓co✓on✓ns✓st✓t c✓ch✓ha✓ar✓r[✓[_✓l_✓e_✓n_✓g_✓t_✓h]✓]
- so that copying the address of one into a non-c✓co✓on✓ns✓st✓t
- c✓ch✓ha✓ar✓r *✓* pointer will get a warning. These warnings
- will help you find at compile time code that can
- try to write into a string constant, but only if
- you have been very careful about using c✓co✓on✓ns✓st✓t in
- declarations and prototypes. Otherwise, it will
- just be a nuisance; this is why we did not make
- `-✓-W✓Wa✓al✓ll✓l' request these warnings.
-
- -✓-W✓Wc✓co✓on✓nv✓ve✓er✓rs✓si✓io✓on✓n
- Warn if a prototype causes a type conversion that
- is different from what would happen to the same ar-
- gument in the absence of a prototype. This in-
- cludes conversions of fixed point to floating and
-
-
-
- GNU Tools 1993/10/13 20
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- vice versa, and conversions changing the width or
- signedness of a fixed point argument except when
- the same as the default promotion.
-
- -✓-W✓Wa✓ag✓gg✓gr✓re✓eg✓ga✓at✓te✓e-✓-r✓re✓et✓tu✓ur✓rn✓n
- Warn if any functions that return structures or
- unions are defined or called. (In languages where
- you can return an array, this also elicits a warn-
- ing.)
-
- -✓-W✓Ws✓st✓tr✓ri✓ic✓ct✓t-✓-p✓pr✓ro✓ot✓to✓ot✓ty✓yp✓pe✓es✓s
- Warn if a function is declared or defined without
- specifying the argument types. (An old-style func-
- tion definition is permitted without a warning if
- preceded by a declaration which specifies the argu-
- ment types.)
-
- -✓-W✓Wm✓mi✓is✓ss✓si✓in✓ng✓g-✓-p✓pr✓ro✓ot✓to✓ot✓ty✓yp✓pe✓es✓s
- Warn if a global function is defined without a pre-
- vious prototype declaration. This warning is is-
- sued even if the definition itself provides a pro-
- totype. The aim is to detect global functions that
- fail to be declared in header files.
-
- -✓-W✓Wm✓mi✓is✓ss✓si✓in✓ng✓g-✓-d✓de✓ec✓cl✓la✓ar✓ra✓at✓ti✓io✓on✓ns✓s
- Warn if a global function is defined without a pre-
- vious declaration. Do so even if the definition
- itself provides a prototype. Use this option to
- detect global functions that are not declared in
- header files.
-
- -✓-W✓Wr✓re✓ed✓du✓un✓nd✓da✓an✓nt✓t-✓-d✓de✓ec✓cl✓ls✓s
- Warn if anything is declared more than once in the
- same scope, even in cases where multiple declara-
- tion is valid and changes nothing.
-
- -✓-W✓Wn✓ne✓es✓st✓te✓ed✓d-✓-e✓ex✓xt✓te✓er✓rn✓ns✓s
- Warn if an e✓ex✓xt✓te✓er✓rn✓n declaration is encountered within
- an function.
-
- -✓-W✓We✓en✓nu✓um✓m-✓-c✓cl✓la✓as✓sh✓h
- Warn about conversion between different enumeration
- types (C++ only).
-
- -✓-W✓Wo✓ov✓ve✓er✓rl✓lo✓oa✓ad✓de✓ed✓d-✓-v✓vi✓ir✓rt✓tu✓ua✓al✓l
- (C++ only.) In a derived class, the definitions of
- virtual functions must match the type signature of
- a virtual function declared in the base class. Use
- this option to request warnings when a derived
- class declares a function that may be an erroneous
- attempt to define a virtual function: that is, warn
- when a function with the same name as a virtual
- function in the base class, but with a type signa-
- ture that doesn't match any virtual functions from
-
-
-
- GNU Tools 1993/10/13 21
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- the base class.
-
- -✓-W✓Wi✓in✓nl✓li✓in✓ne✓e
- Warn if a function can not be inlined, and either
- it was declared as inline, or else the -✓-f✓fi✓in✓n-✓-
- l✓li✓in✓ne✓e-✓-f✓fu✓un✓nc✓ct✓ti✓io✓on✓ns✓s option was given.
-
- -✓-W✓We✓er✓rr✓ro✓or✓r
- Treat warnings as errors; abort compilation after
- any warning.
-
- D✓DE✓EB✓BU✓UG✓GG✓GI✓IN✓NG✓G O✓OP✓PT✓TI✓IO✓ON✓NS✓S
- GNU CC has various special options that are used for de-
- bugging either your program or GCC:
-
- -✓-g✓g Produce debugging information in the operating sys-
- tem's native format (stabs, COFF, XCOFF, or DWARF).
- GDB can work with this debugging information.
-
- On most systems that use stabs format, `-✓-g✓g' enables
- use of extra debugging information that only GDB
- can use; this extra information makes debugging
- work better in GDB but will probably make other de-
- buggers crash or refuse to read the program. If
- you want to control for certain whether to generate
- the extra information, use `-✓-g✓gs✓st✓ta✓ab✓bs✓s+✓+', `-✓-g✓gs✓st✓ta✓ab✓bs✓s',
- `-✓-g✓gx✓xc✓co✓of✓ff✓f+✓+', `-✓-g✓gx✓xc✓co✓of✓ff✓f', `-✓-g✓gd✓dw✓wa✓ar✓rf✓f+✓+', or `-✓-g✓gd✓dw✓wa✓ar✓rf✓f'
- (see below).
-
- Unlike most other C compilers, GNU CC allows you to
- use `-✓-g✓g' with `-✓-O✓O'. The shortcuts taken by opti-
- mized code may occasionally produce surprising re-
- sults: some variables you declared may not exist at
- all; flow of control may briefly move where you did
- not expect it; some statements may not be executed
- because they compute constant results or their val-
- ues were already at hand; some statements may exe-
- cute in different places because they were moved
- out of loops.
-
- Nevertheless it proves possible to debug optimized
- output. This makes it reasonable to use the opti-
- mizer for programs that might have bugs.
-
- The following options are useful when GNU CC is generated
- with the capability for more than one debugging format.
-
- -✓-g✓gg✓gd✓db✓b Produce debugging information in the native format
- (if that is supported), including GDB extensions if
- at all possible.
-
- -✓-g✓gs✓st✓ta✓ab✓bs✓s
- Produce debugging information in stabs format (if
- that is supported), without GDB extensions. This
-
-
-
- GNU Tools 1993/10/13 22
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- is the format used by DBX on most BSD systems.
-
- -✓-g✓gs✓st✓ta✓ab✓bs✓s+✓+
- Produce debugging information in stabs format (if
- that is supported), using GNU extensions understood
- only by the GNU debugger (GDB). The use of these
- extensions is likely to make other debuggers crash
- or refuse to read the program.
-
- -✓-g✓gc✓co✓of✓ff✓f Produce debugging information in COFF format (if
- that is supported). This is the format used by SDB
- on most System V systems prior to System V Release
- 4.
-
- -✓-g✓gx✓xc✓co✓of✓ff✓f
- Produce debugging information in XCOFF format (if
- that is supported). This is the format used by the
- DBX debugger on IBM RS/6000 systems.
-
- -✓-g✓gx✓xc✓co✓of✓ff✓f+✓+
- Produce debugging information in XCOFF format (if
- that is supported), using GNU extensions understood
- only by the GNU debugger (GDB). The use of these
- extensions is likely to make other debuggers crash
- or refuse to read the program.
-
- -✓-g✓gd✓dw✓wa✓ar✓rf✓f
- Produce debugging information in DWARF format (if
- that is supported). This is the format used by SDB
- on most System V Release 4 systems.
-
- -✓-g✓gd✓dw✓wa✓ar✓rf✓f+✓+
- Produce debugging information in DWARF format (if
- that is supported), using GNU extensions understood
- only by the GNU debugger (GDB). The use of these
- extensions is likely to make other debuggers crash
- or refuse to read the program.
-
- -✓-g✓g_✓l_✓e_✓v_✓e_✓l
- -✓-g✓gg✓gd✓db✓b_✓l_✓e_✓v_✓e_✓l
- -✓-g✓gs✓st✓ta✓ab✓bs✓s_✓l_✓e_✓v_✓e_✓l
- -✓-g✓gc✓co✓of✓ff✓f_✓l_✓e_✓v_✓e_✓l -✓-g✓gx✓xc✓co✓of✓ff✓f_✓l_✓e_✓v_✓e_✓l
-
- -✓-g✓gd✓dw✓wa✓ar✓rf✓f_✓l_✓e_✓v_✓e_✓l
- Request debugging information and also use _✓l_✓e_✓v_✓e_✓l to
- specify how much information. The default level is
- 2.
-
- Level 1 produces minimal information, enough for
- making backtraces in parts of the program that you
- don't plan to debug. This includes descriptions of
- functions and external variables, but no informa-
- tion about local variables and no line numbers.
-
-
-
-
- GNU Tools 1993/10/13 23
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- Level 3 includes extra information, such as all the
- macro definitions present in the program. Some de-
- buggers support macro expansion when you use `-✓-g✓g3✓3'.
-
- -✓-p✓p Generate extra code to write profile information
- suitable for the analysis program p✓pr✓ro✓of✓f.
-
- -✓-p✓pg✓g Generate extra code to write profile information
- suitable for the analysis program g✓gp✓pr✓ro✓of✓f.
-
- -✓-a✓a Generate extra code to write profile information
- for basic blocks, which will record the number of
- times each basic block is executed. This data
- could be analyzed by a program like t✓tc✓co✓ov✓v. Note,
- however, that the format of the data is not what
- t✓tc✓co✓ov✓v expects. Eventually GNU g✓gp✓pr✓ro✓of✓f should be ex-
- tended to process this data.
-
- -✓-d✓d_✓l_✓e_✓t_✓t_✓e_✓r_✓s
- Says to make debugging dumps during compilation at
- times specified by _✓l_✓e_✓t_✓t_✓e_✓r_✓s. This is used for de-
- bugging the compiler. The file names for most of
- the dumps are made by appending a word to the
- source file name (e.g. `f✓fo✓oo✓o.✓.c✓c.✓.r✓rt✓tl✓l' or
- `f✓fo✓oo✓o.✓.c✓c.✓.j✓ju✓um✓mp✓p').
-
- -✓-d✓dM✓M Dump all macro definitions, at the end of prepro-
- cessing, and write no output.
-
- -✓-d✓dN✓N Dump all macro names, at the end of preprocessing.
-
- -✓-d✓dD✓D Dump all macro definitions, at the end of prepro-
- cessing, in addition to normal output.
-
- -✓-d✓dy✓y Dump debugging information during parsing, to stan-
- dard error.
-
- -✓-d✓dr✓r Dump after RTL generation, to `_✓f_✓i_✓l_✓e.✓.r✓rt✓tl✓l'.
-
- -✓-d✓dx✓x Just generate RTL for a function instead of compil-
- ing it. Usually used with `r✓r'.
-
- -✓-d✓dj✓j Dump after first jump optimization, to `_✓f_✓i_✓l_✓e.✓.j✓ju✓um✓mp✓p'.
-
- -✓-d✓ds✓s Dump after CSE (including the jump optimization
- that sometimes follows CSE), to `_✓f_✓i_✓l_✓e.✓.c✓cs✓se✓e'.
-
- -✓-d✓dL✓L Dump after loop optimization, to `_✓f_✓i_✓l_✓e.✓.l✓lo✓oo✓op✓p'.
-
- -✓-d✓dt✓t Dump after the second CSE pass (including the jump
- optimization that sometimes follows CSE), to
- `_✓f_✓i_✓l_✓e.✓.c✓cs✓se✓e2✓2'.
-
- -✓-d✓df✓f Dump after flow analysis, to `_✓f_✓i_✓l_✓e.✓.f✓fl✓lo✓ow✓w'.
-
-
-
- GNU Tools 1993/10/13 24
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-d✓dc✓c Dump after instruction combination, to
- `_✓f_✓i_✓l_✓e.✓.c✓co✓om✓mb✓bi✓in✓ne✓e'.
-
- -✓-d✓dS✓S Dump after the first instruction scheduling pass,
- to `_✓f_✓i_✓l_✓e.✓.s✓sc✓ch✓he✓ed✓d'.
-
- -✓-d✓dl✓l Dump after local register allocation, to
- `_✓f_✓i_✓l_✓e.✓.l✓lr✓re✓eg✓g'.
-
- -✓-d✓dg✓g Dump after global register allocation, to
- `_✓f_✓i_✓l_✓e.✓.g✓gr✓re✓eg✓g'.
-
- -✓-d✓dR✓R Dump after the second instruction scheduling pass,
- to `_✓f_✓i_✓l_✓e.✓.s✓sc✓ch✓he✓ed✓d2✓2'.
-
- -✓-d✓dJ✓J Dump after last jump optimization, to `_✓f_✓i_✓l_✓e.✓.j✓ju✓um✓mp✓p2✓2'.
-
- -✓-d✓dd✓d Dump after delayed branch scheduling, to
- `_✓f_✓i_✓l_✓e.✓.d✓db✓br✓r'.
-
- -✓-d✓dk✓k Dump after conversion from registers to stack, to
- `_✓f_✓i_✓l_✓e.✓.s✓st✓ta✓ac✓ck✓k'.
-
- -✓-d✓da✓a Produce all the dumps listed above.
-
- -✓-d✓dm✓m Print statistics on memory usage, at the end of the
- run, to standard error.
-
- -✓-d✓dp✓p Annotate the assembler output with a comment indi-
- cating which pattern and alternative was used.
-
- -✓-f✓fp✓pr✓re✓et✓te✓en✓nd✓d-✓-f✓fl✓lo✓oa✓at✓t
- When running a cross-compiler, pretend that the
- target machine uses the same floating point format
- as the host machine. This causes incorrect output
- of the actual floating constants, but the actual
- instruction sequence will probably be the same as
- GNU CC would make when running on the target ma-
- chine.
-
- -✓-s✓sa✓av✓ve✓e-✓-t✓te✓em✓mp✓ps✓s
- Store the usual "temporary" intermediate files per-
- manently; place them in the current directory and
- name them based on the source file. Thus, compil-
- ing `f✓fo✓oo✓o.✓.c✓c' with `-✓-c✓c -✓-s✓sa✓av✓ve✓e-✓-t✓te✓em✓mp✓ps✓s' would produce
- files `f✓fo✓oo✓o.✓.c✓cp✓pp✓p' and `f✓fo✓oo✓o.✓.s✓s', as well as `f✓fo✓oo✓o.✓.o✓o'.
-
- -✓-p✓pr✓ri✓in✓nt✓t-✓-f✓fi✓il✓le✓e-✓-n✓na✓am✓me✓e=✓=_✓l_✓i_✓b_✓r_✓a_✓r_✓y
- Print the full absolute name of the library file
- _✓l_✓i_✓b_✓r_✓a_✓r_✓y that would be used when linking--and do
- not do anything else. With this option, GNU CC
- does not compile or link anything; it just prints
- the file name.
-
-
-
-
- GNU Tools 1993/10/13 25
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-p✓pr✓ri✓in✓nt✓t-✓-l✓li✓ib✓bg✓gc✓cc✓c-✓-f✓fi✓il✓le✓e-✓-n✓na✓am✓me✓e
- Same as `-✓-p✓pr✓ri✓in✓nt✓t-✓-f✓fi✓il✓le✓e-✓-n✓na✓am✓me✓e=✓=l✓li✓ib✓bg✓gc✓cc✓c.✓.a✓a'.
-
- -✓-p✓pr✓ri✓in✓nt✓t-✓-p✓pr✓ro✓og✓g-✓-n✓na✓am✓me✓e=✓=_✓p_✓r_✓o_✓g_✓r_✓a_✓m
- Like `-✓-p✓pr✓ri✓in✓nt✓t-✓-f✓fi✓il✓le✓e-✓-n✓na✓am✓me✓e', but searches for a program
- such as `cpp'.
-
- O✓OP✓PT✓TI✓IM✓MI✓IZ✓ZA✓AT✓TI✓IO✓ON✓N O✓OP✓PT✓TI✓IO✓ON✓NS✓S
- These options control various sorts of optimizations:
-
- -✓-O✓O
-
- -✓-O✓O1✓1 Optimize. Optimizing compilation takes somewhat
- more time, and a lot more memory for a large func-
- tion.
-
- Without `-✓-O✓O', the compiler's goal is to reduce the
- cost of compilation and to make debugging produce
- the expected results. Statements are independent:
- if you stop the program with a breakpoint between
- statements, you can then assign a new value to any
- variable or change the program counter to any other
- statement in the function and get exactly the re-
- sults you would expect from the source code.
-
- Without `-✓-O✓O', only variables declared r✓re✓eg✓gi✓is✓st✓te✓er✓r are
- allocated in registers. The resulting compiled
- code is a little worse than produced by PCC without
- `-✓-O✓O'.
-
- With `-✓-O✓O', the compiler tries to reduce code size
- and execution time.
-
- When you specify `-✓-O✓O', the two options
- `-✓-f✓ft✓th✓hr✓re✓ea✓ad✓d-✓-j✓ju✓um✓mp✓ps✓s' and `-✓-f✓fd✓de✓ef✓fe✓er✓r-✓-p✓po✓op✓p' are turned on.
- On machines that have delay slots, the
- `-✓-f✓fd✓de✓el✓la✓ay✓ye✓ed✓d-✓-b✓br✓ra✓an✓nc✓ch✓h' option is turned on. For those
- machines that can support debugging even without a
- frame pointer, the `-✓-f✓fo✓om✓mi✓it✓t-✓-f✓fr✓ra✓am✓me✓e-✓-p✓po✓oi✓in✓nt✓te✓er✓r' option is
- turned on. On some machines other flags may also
- be turned on.
-
- -✓-O✓O2✓2 Optimize even more. Nearly all supported optimiza-
- tions that do not involve a space-speed tradeoff
- are performed. Loop unrolling and function inlin-
- ing are not done, for example. As compared to -✓-O✓O,
- this option increases both compilation time and the
- performance of the generated code.
-
- -✓-O✓O3✓3 Optimize yet more. This turns on everything -✓-O✓O2✓2
- does, along with also turning on -✓-f✓fi✓in✓n-✓-
- l✓li✓in✓ne✓e-✓-f✓fu✓un✓nc✓ct✓ti✓io✓on✓ns✓s.✓.
-
- -✓-O✓O0✓0 Do not optimize.
-
-
-
- GNU Tools 1993/10/13 26
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- If you use multiple -✓-O✓O options, with or without
- level numbers, the last such option is the one that
- is effective.
-
- Options of the form `-✓-f✓f_✓f_✓l_✓a_✓g' specify machine-independent
- flags. Most flags have both positive and negative forms;
- the negative form of `-✓-f✓ff✓fo✓oo✓o' would be `-✓-f✓fn✓no✓o-✓-f✓fo✓oo✓o'. The
- following list shows only one form--the one which is not
- the default. You can figure out the other form by either
- removing `n✓no✓o-✓-' or adding it.
-
- -✓-f✓ff✓fl✓lo✓oa✓at✓t-✓-s✓st✓to✓or✓re✓e
- Do not store floating point variables in registers.
- This prevents undesirable excess precision on ma-
- chines such as the 68000 where the floating regis-
- ters (of the 68881) keep more precision than a d✓do✓ou✓u-✓-
- b✓bl✓le✓e is supposed to have.
-
- For most programs, the excess precision does only
- good, but a few programs rely on the precise defi-
- nition of IEEE floating point. Use `-✓-f✓ff✓fl✓lo✓oa✓at✓t-✓-s✓st✓to✓or✓re✓e'
- for such programs.
-
- -✓-f✓fm✓me✓em✓mo✓oi✓iz✓ze✓e-✓-l✓lo✓oo✓ok✓ku✓up✓ps✓s
-
- -✓-f✓fs✓sa✓av✓ve✓e-✓-m✓me✓em✓mo✓oi✓iz✓ze✓ed✓d
- Use heuristics to compile faster (C++ only). These
- heuristics are not enabled by default, since they
- are only effective for certain input files. Other
- input files compile more slowly.
-
- The first time the compiler must build a call to a
- member function (or reference to a data member), it
- must (1) determine whether the class implements
- member functions of that name; (2) resolve which
- member function to call (which involves figuring
- out what sorts of type conversions need to be
- made); and (3) check the visibility of the member
- function to the caller. All of this adds up to
- slower compilation. Normally, the second time a
- call is made to that member function (or reference
- to that data member), it must go through the same
- lengthy process again. This means that code like
- this
-
- cout << "This " << p << " has " << n << "
- legs.\n";
-
- makes six passes through all three steps. By using
- a software cache, a "hit" significantly reduces
- this cost. Unfortunately, using the cache intro-
- duces another layer of mechanisms which must be im-
- plemented, and so incurs its own overhead.
- `-✓-f✓fm✓me✓em✓mo✓oi✓iz✓ze✓e-✓-l✓lo✓oo✓ok✓ku✓up✓ps✓s' enables the software cache.
-
-
-
- GNU Tools 1993/10/13 27
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- Because access privileges (visibility) to members
- and member functions may differ from one function
- context to the next, g✓g+✓++✓+ may need to flush the
- cache. With the `-✓-f✓fm✓me✓em✓mo✓oi✓iz✓ze✓e-✓-l✓lo✓oo✓ok✓ku✓up✓ps✓s' flag, the
- cache is flushed after every function that is com-
- piled. The `-fsave-memoized' flag enables the same
- software cache, but when the compiler determines
- that the context of the last function compiled
- would yield the same access privileges of the next
- function to compile, it preserves the cache. This
- is most helpful when defining many member functions
- for the same class: with the exception of member
- functions which are friends of other classes, each
- member function has exactly the same access privi-
- leges as every other, and the cache need not be
- flushed.
-
- -✓-f✓fn✓no✓o-✓-d✓de✓ef✓fa✓au✓ul✓lt✓t-✓-i✓in✓nl✓li✓in✓ne✓e
- Don't make member functions inline by default mere-
- ly because they are defined inside the class scope
- (C++ only).
-
- -✓-f✓fn✓no✓o-✓-d✓de✓ef✓fe✓er✓r-✓-p✓po✓op✓p
- Always pop the arguments to each function call as
- soon as that function returns. For machines which
- must pop arguments after a function call, the com-
- piler normally lets arguments accumulate on the
- stack for several function calls and pops them all
- at once.
-
- -✓-f✓ff✓fo✓or✓rc✓ce✓e-✓-m✓me✓em✓m
- Force memory operands to be copied into registers
- before doing arithmetic on them. This may produce
- better code by making all memory references poten-
- tial common subexpressions. When they are not com-
- mon subexpressions, instruction combination should
- eliminate the separate register-load. I am inter-
- ested in hearing about the difference this makes.
-
- -✓-f✓ff✓fo✓or✓rc✓ce✓e-✓-a✓ad✓dd✓dr✓r
- Force memory address constants to be copied into
- registers before doing arithmetic on them. This
- may produce better code just as `-✓-f✓ff✓fo✓or✓rc✓ce✓e-✓-m✓me✓em✓m' may.
- I am interested in hearing about the difference
- this makes.
-
- -✓-f✓fo✓om✓mi✓it✓t-✓-f✓fr✓ra✓am✓me✓e-✓-p✓po✓oi✓in✓nt✓te✓er✓r
- Don't keep the frame pointer in a register for
- functions that don't need one. This avoids the in-
- structions to save, set up and restore frame point-
- ers; it also makes an extra register available in
- many functions. _✓I_✓t _✓a_✓l_✓s_✓o _✓m_✓a_✓k_✓e_✓s _✓d_✓e_✓b_✓u_✓g_✓g_✓i_✓n_✓g _✓i_✓m_✓p_✓o_✓s_✓s_✓i_✓b_✓l_✓e
- _✓o_✓n most machines.
-
-
-
-
- GNU Tools 1993/10/13 28
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- On some machines, such as the Vax, this flag has no
- effect, because the standard calling sequence auto-
- matically handles the frame pointer and nothing is
- saved by pretending it doesn't exist. The machine-
- description macro F✓FR✓RA✓AM✓ME✓E_✓_P✓PO✓OI✓IN✓NT✓TE✓ER✓R_✓_R✓RE✓EQ✓QU✓UI✓IR✓RE✓ED✓D controls
- whether a target machine supports this flag.
-
- -✓-f✓fi✓in✓nl✓li✓in✓ne✓e-✓-f✓fu✓un✓nc✓ct✓ti✓io✓on✓ns✓s
- Integrate all simple functions into their callers.
- The compiler heuristically decides which functions
- are simple enough to be worth integrating in this
- way.
-
- If all calls to a given function are integrated,
- and the function is declared s✓st✓ta✓at✓ti✓ic✓c, then GCC nor-
- mally does not output the function as assembler
- code in its own right.
-
- -✓-f✓fc✓ca✓al✓ll✓le✓er✓r-✓-s✓sa✓av✓ve✓es✓s
- Enable values to be allocated in registers that
- will be clobbered by function calls, by emitting
- extra instructions to save and restore the regis-
- ters around such calls. Such allocation is done
- only when it seems to result in better code than
- would otherwise be produced.
-
- This option is enabled by default on certain ma-
- chines, usually those which have no call-preserved
- registers to use instead.
-
- -✓-f✓fk✓ke✓ee✓ep✓p-✓-i✓in✓nl✓li✓in✓ne✓e-✓-f✓fu✓un✓nc✓ct✓ti✓io✓on✓ns✓s
- Even if all calls to a given function are integrat-
- ed, and the function is declared s✓st✓ta✓at✓ti✓ic✓c, neverthe-
- less output a separate run-time callable version of
- the function.
-
- -✓-f✓fn✓no✓o-✓-f✓fu✓un✓nc✓ct✓ti✓io✓on✓n-✓-c✓cs✓se✓e
- Do not put function addresses in registers; make
- each instruction that calls a constant function
- contain the function's address explicitly.
-
- This option results in less efficient code, but
- some strange hacks that alter the assembler output
- may be confused by the optimizations performed when
- this option is not used.
-
- -✓-f✓fn✓no✓o-✓-p✓pe✓ee✓ep✓ph✓ho✓ol✓le✓e
- Disable any machine-specific peephole optimiza-
- tions.
-
- -✓-f✓ff✓fa✓as✓st✓t-✓-m✓ma✓at✓th✓h
- This option allows GCC to violate some ANSI or IEEE
- rules/specifications in the interest of optimizing
- code for speed. For example, it allows the compil-
-
-
-
- GNU Tools 1993/10/13 29
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- er to assume arguments to the s✓sq✓qr✓rt✓t function are
- non-negative numbers.
-
- This option should never be turned on by any `-✓-O✓O'
- option since it can result in incorrect output for
- programs which depend on an exact implementation of
- IEEE or ANSI rules/specifications for math func-
- tions.
-
- The following options control specific optimizations. The
- `-✓-O✓O2✓2' option turns on all of these optimizations except
- `-✓-f✓fu✓un✓nr✓ro✓ol✓ll✓l-✓-l✓lo✓oo✓op✓ps✓s' and `-✓-f✓fu✓un✓nr✓ro✓ol✓ll✓l-✓-a✓al✓ll✓l-✓-l✓lo✓oo✓op✓ps✓s'.
-
- The `-✓-O✓O' option usually turns on the `-✓-f✓ft✓th✓hr✓re✓ea✓ad✓d-✓-j✓ju✓um✓mp✓ps✓s' and
- `-✓-f✓fd✓de✓el✓la✓ay✓ye✓ed✓d-✓-b✓br✓ra✓an✓nc✓ch✓h' options, but specific machines may
- change the default optimizations.
-
- You can use the following flags in the rare cases when
- "fine-tuning" of optimizations to be performed is desired.
-
- -✓-f✓fs✓st✓tr✓re✓en✓ng✓gt✓th✓h-✓-r✓re✓ed✓du✓uc✓ce✓e
- Perform the optimizations of loop strength reduc-
- tion and elimination of iteration variables.
-
- -✓-f✓ft✓th✓hr✓re✓ea✓ad✓d-✓-j✓ju✓um✓mp✓ps✓s
- Perform optimizations where we check to see if a
- jump branches to a location where another compari-
- son subsumed by the first is found. If so, the
- first branch is redirected to either the destina-
- tion of the second branch or a point immediately
- following it, depending on whether the condition is
- known to be true or false.
-
- -✓-f✓fu✓un✓nr✓ro✓ol✓ll✓l-✓-l✓lo✓oo✓op✓ps✓s
- Perform the optimization of loop unrolling. This
- is only done for loops whose number of iterations
- can be determined at compile time or run time.
-
- -✓-f✓fu✓un✓nr✓ro✓ol✓ll✓l-✓-a✓al✓ll✓l-✓-l✓lo✓oo✓op✓ps✓s
- Perform the optimization of loop unrolling. This
- is done for all loops. This usually makes programs
- run more slowly.
-
- -✓-f✓fc✓cs✓se✓e-✓-f✓fo✓ol✓ll✓lo✓ow✓w-✓-j✓ju✓um✓mp✓ps✓s
- In common subexpression elimination, scan through
- jump instructions when the target of the jump is
- not reached by any other path. For example, when
- CSE encounters an i✓if✓f statement with an e✓el✓ls✓se✓e clause,
- CSE will follow the jump when the condition tested
- is false.
-
- -✓-f✓fc✓cs✓se✓e-✓-s✓sk✓ki✓ip✓p-✓-b✓bl✓lo✓oc✓ck✓ks✓s
- This is similar to `-✓-f✓fc✓cs✓se✓e-✓-f✓fo✓ol✓ll✓lo✓ow✓w-✓-j✓ju✓um✓mp✓ps✓s', but causes
- CSE to follow jumps which conditionally skip over
-
-
-
- GNU Tools 1993/10/13 30
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- blocks. When CSE encounters a simple i✓if✓f statement
- with no else clause, `-✓-f✓fc✓cs✓se✓e-✓-s✓sk✓ki✓ip✓p-✓-b✓bl✓lo✓oc✓ck✓ks✓s' causes CSE
- to follow the jump around the body of the i✓if✓f.
-
- -✓-f✓fr✓re✓er✓ru✓un✓n-✓-c✓cs✓se✓e-✓-a✓af✓ft✓te✓er✓r-✓-l✓lo✓oo✓op✓p
- Re-run common subexpression elimination after loop
- optimizations has been performed.
-
- -✓-f✓fe✓el✓li✓id✓de✓e-✓-c✓co✓on✓ns✓st✓tr✓ru✓uc✓ct✓to✓or✓rs✓s
- Elide constructors when this seems plausible (C++
- only). With this flag, GNU C++ initializes y✓y di-
- rectly from the call to f✓fo✓oo✓o without going through a
- temporary in the following code:
-
- A foo (); A y = foo ();
-
- Without this option, GNU C++ first initializes y✓y by
- calling the appropriate constructor for type A✓A;
- then assigns the result of f✓fo✓oo✓o to a temporary; and,
- finally, replaces the initial valyue of `y✓y' with
- the temporary.
-
- The default behavior (`-✓-f✓fn✓no✓o-✓-e✓el✓li✓id✓de✓e-✓-c✓co✓on✓ns✓st✓tr✓ru✓uc✓ct✓to✓or✓rs✓s') is
- specified by the draft ANSI C++ standard. If your
- program's constructors have side effects, using
- `-✓-f✓fe✓el✓li✓id✓de✓e-✓-c✓co✓on✓ns✓st✓tr✓ru✓uc✓ct✓to✓or✓rs✓s' can make your program act
- differently, since some constructor calls may be
- omitted.
-
- -✓-f✓fe✓ex✓xp✓pe✓en✓ns✓si✓iv✓ve✓e-✓-o✓op✓pt✓ti✓im✓mi✓iz✓za✓at✓ti✓io✓on✓ns✓s
- Perform a number of minor optimizations that are
- relatively expensive.
-
- -✓-f✓fd✓de✓el✓la✓ay✓ye✓ed✓d-✓-b✓br✓ra✓an✓nc✓ch✓h
- If supported for the target machine, attempt to re-
- order instructions to exploit instruction slots
- available after delayed branch instructions.
-
- -✓-f✓fs✓sc✓ch✓he✓ed✓du✓ul✓le✓e-✓-i✓in✓ns✓sn✓ns✓s
- If supported for the target machine, attempt to re-
- order instructions to eliminate execution stalls
- due to required data being unavailable. This helps
- machines that have slow floating point or memory
- load instructions by allowing other instructions to
- be issued until the result of the load or floating
- point instruction is required.
-
- -✓-f✓fs✓sc✓ch✓he✓ed✓du✓ul✓le✓e-✓-i✓in✓ns✓sn✓ns✓s2✓2
- Similar to `-✓-f✓fs✓sc✓ch✓he✓ed✓du✓ul✓le✓e-✓-i✓in✓ns✓sn✓ns✓s', but requests an ad-
- ditional pass of instruction scheduling after reg-
- ister allocation has been done. This is especially
- useful on machines with a relatively small number
- of registers and where memory load instructions
- take more than one cycle.
-
-
-
- GNU Tools 1993/10/13 31
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- T✓TA✓AR✓RG✓GE✓ET✓T O✓OP✓PT✓TI✓IO✓ON✓NS✓S
- By default, GNU CC compiles code for the same type of ma-
- chine that you are using. However, it can also be in-
- stalled as a cross-compiler, to compile for some other
- type of machine. In fact, several different configura-
- tions of GNU CC, for different target machines, can be in-
- stalled side by side. Then you specify which one to use
- with the `-✓-b✓b' option.
-
- In addition, older and newer versions of GNU CC can be in-
- stalled side by side. One of them (probably the newest)
- will be the default, but you may sometimes wish to use an-
- other.
-
- -✓-b✓b _✓m_✓a_✓c_✓h_✓i_✓n_✓e
- The argument _✓m_✓a_✓c_✓h_✓i_✓n_✓e specifies the target machine
- for compilation. This is useful when you have in-
- stalled GNU CC as a cross-compiler.
-
- The value to use for _✓m_✓a_✓c_✓h_✓i_✓n_✓e is the same as was
- specified as the machine type when configuring GNU
- CC as a cross-compiler. For example, if a cross-
- compiler was configured with `c✓co✓on✓nf✓fi✓ig✓gu✓ur✓re✓e i386v',
- meaning to compile for an 80386 running System V,
- then you would specify `-✓-b✓b i✓i3✓38✓86✓6v✓v' to run that cross
- compiler.
-
- When you do not specify `-✓-b✓b', it normally means to
- compile for the same type of machine that you are
- using.
-
- -✓-V✓V _✓v_✓e_✓r_✓s_✓i_✓o_✓n
- The argument _✓v_✓e_✓r_✓s_✓i_✓o_✓n specifies which version of GNU
- CC to run. This is useful when multiple versions
- are installed. For example, _✓v_✓e_✓r_✓s_✓i_✓o_✓n might be
- `2✓2.✓.0✓0', meaning to run GNU CC version 2.0.
-
- The default version, when you do not specify `-✓-V✓V',
- is controlled by the way GNU CC is installed. Nor-
- mally, it will be a version that is recommended for
- general use.
-
- M✓MA✓AC✓CH✓HI✓IN✓NE✓E D✓DE✓EP✓PE✓EN✓ND✓DE✓EN✓NT✓T O✓OP✓PT✓TI✓IO✓ON✓NS✓S
- Each of the target machine types can have its own special
- options, starting with `-✓-m✓m', to choose among various hard-
- ware models or configurations--for example, 68010 vs
- 68020, floating coprocessor or none. A single installed
- version of the compiler can compile for any model or con-
- figuration, according to the options specified.
-
- Some configurations of the compiler also support addition-
- al special options, usually for command-line compatibility
- with other compilers on the same platform.
-
-
-
-
- GNU Tools 1993/10/13 32
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- These are the `-✓-m✓m' options defined for the 68000 series:
-
- -✓-m✓m6✓68✓80✓00✓00✓0
-
- -✓-m✓mc✓c6✓68✓80✓00✓00✓0
- Generate output for a 68000. This is the default
- when the compiler is configured for 68000-based
- systems.
-
- -✓-m✓m6✓68✓80✓02✓20✓0
-
- -✓-m✓mc✓c6✓68✓80✓02✓20✓0
- Generate output for a 68020 (rather than a 68000).
- This is the default when the compiler is configured
- for 68020-based systems.
-
- -✓-m✓m6✓68✓88✓88✓81✓1
- Generate output containing 68881 instructions for
- floating point. This is the default for most
- 68020-based systems unless -✓-n✓nf✓fp✓p was specified when
- the compiler was configured.
-
- -✓-m✓m6✓68✓80✓03✓30✓0
- Generate output for a 68030. This is the default
- when the compiler is configured for 68030-based
- systems.
-
- -✓-m✓m6✓68✓80✓04✓40✓0
- Generate output for a 68040. This is the default
- when the compiler is configured for 68040-based
- systems.
-
- -✓-m✓m6✓68✓80✓02✓20✓0-✓-4✓40✓0
- Generate output for a 68040, without using any of
- the new instructions. This results in code which
- can run relatively efficiently on either a
- 68020/68881 or a 68030 or a 68040.
-
- -✓-m✓mf✓fp✓pa✓a Generate output containing Sun FPA instructions for
- floating point.
-
- -✓-m✓ms✓so✓of✓ft✓t-✓-f✓fl✓lo✓oa✓at✓t
- Generate output containing library calls for float-
- ing point. _✓W_✓A_✓R_✓N_✓I_✓N_✓G_✓: the requisite libraries are
- not part of GNU CC. Normally the facilities of the
- machine's usual C compiler are used, but this can't
- be done directly in cross-compilation. You must
- make your own arrangements to provide suitable li-
- brary functions for cross-compilation.
-
- -✓-m✓ms✓sh✓ho✓or✓rt✓t
- Consider type i✓in✓nt✓t to be 16 bits wide, like s✓sh✓ho✓or✓rt✓t
- i✓in✓nt✓t.
-
-
-
-
- GNU Tools 1993/10/13 33
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-m✓mn✓no✓ob✓bi✓it✓tf✓fi✓ie✓el✓ld✓d
- Do not use the bit-field instructions. `-✓-m✓m6✓68✓80✓00✓00✓0'
- implies `-✓-m✓mn✓no✓ob✓bi✓it✓tf✓fi✓ie✓el✓ld✓d'.
-
- -✓-m✓mb✓bi✓it✓tf✓fi✓ie✓el✓ld✓d
- Do use the bit-field instructions. `-✓-m✓m6✓68✓80✓02✓20✓0' im-
- plies `-✓-m✓mb✓bi✓it✓tf✓fi✓ie✓el✓ld✓d'. This is the default if you use
- the unmodified sources.
-
- -✓-m✓mr✓rt✓td✓d Use a different function-calling convention, in
- which functions that take a fixed number of argu-
- ments return with the r✓rt✓td✓d instruction, which pops
- their arguments while returning. This saves one
- instruction in the caller since there is no need to
- pop the arguments there.
-
- This calling convention is incompatible with the
- one normally used on Unix, so you cannot use it if
- you need to call libraries compiled with the Unix
- compiler.
-
- Also, you must provide function prototypes for all
- functions that take variable numbers of arguments
- (including p✓pr✓ri✓in✓nt✓tf✓f); otherwise incorrect code will
- be generated for calls to those functions.
-
- In addition, seriously incorrect code will result
- if you call a function with too many arguments.
- (Normally, extra arguments are harmlessly ignored.)
-
- The r✓rt✓td✓d instruction is supported by the 68010 and
- 68020 processors, but not by the 68000.
-
- These `-✓-m✓m' options are defined for the Vax:
-
- -✓-m✓mu✓un✓ni✓ix✓x Do not output certain jump instructions (a✓ao✓ob✓bl✓le✓eq✓q and
- so on) that the Unix assembler for the Vax cannot
- handle across long ranges.
-
- -✓-m✓mg✓gn✓nu✓u Do output those jump instructions, on the assump-
- tion that you will assemble with the GNU assembler.
-
- -✓-m✓mg✓g Output code for g-format floating point numbers in-
- stead of d-format.
-
- These `-✓-m✓m' switches are supported on the SPARC:
-
- -✓-m✓mf✓fp✓pu✓u
-
- -✓-m✓mh✓ha✓ar✓rd✓d-✓-f✓fl✓lo✓oa✓at✓t
- Generate output containing floating point instruc-
- tions. This is the default.
-
- -✓-m✓mn✓no✓o-✓-f✓fp✓pu✓u
-
-
-
- GNU Tools 1993/10/13 34
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-m✓ms✓so✓of✓ft✓t-✓-f✓fl✓lo✓oa✓at✓t
- Generate output containing library calls for float-
- ing point. _✓W_✓a_✓r_✓n_✓i_✓n_✓g_✓: there is no GNU floating-point
- library for SPARC. Normally the facilities of the
- machine's usual C compiler are used, but this can-
- not be done directly in cross-compilation. You
- must make your own arrangements to provide suitable
- library functions for cross-compilation.
-
- -✓-m✓ms✓so✓of✓ft✓t-✓-f✓fl✓lo✓oa✓at✓t changes the calling convention in the
- output file; therefore, it is only useful if you
- compile _✓a_✓l_✓l of a program with this option.
-
- -✓-m✓mn✓no✓o-✓-e✓ep✓pi✓il✓lo✓og✓gu✓ue✓e
-
- -✓-m✓me✓ep✓pi✓il✓lo✓og✓gu✓ue✓e
- With -✓-m✓me✓ep✓pi✓il✓lo✓og✓gu✓ue✓e (the default), the compiler always
- emits code for function exit at the end of each
- function. Any function exit in the middle of the
- function (such as a return statement in C) will
- generate a jump to the exit code at the end of the
- function.
-
- With -✓-m✓mn✓no✓o-✓-e✓ep✓pi✓il✓lo✓og✓gu✓ue✓e, the compiler tries to emit exit
- code inline at every function exit.
-
- -✓-m✓mn✓no✓o-✓-v✓v8✓8
-
- -✓-m✓mv✓v8✓8
-
- -✓-m✓ms✓sp✓pa✓ar✓rc✓cl✓li✓it✓te✓e
- These three options select variations on the SPARC
- architecture.
-
- By default (unless specifically configured for the
- Fujitsu SPARClite), GCC generates code for the v7
- variant of the SPARC architecture.
-
- -✓-m✓mv✓v8✓8 will give you SPARC v8 code. The only differ-
- ence from v7 code is that the compiler emits the
- integer multiply and integer divide instructions
- which exist in SPARC v8 but not in SPARC v7.
-
- -✓-m✓ms✓sp✓pa✓ar✓rc✓cl✓li✓it✓te✓e will give you SPARClite code. This
- adds the integer multiply, integer divide step and
- scan (ffs) instructions which exist in SPARClite
- but not in SPARC v7.
-
- -✓-m✓mc✓cy✓yp✓pr✓re✓es✓ss✓s
-
- -✓-m✓ms✓su✓up✓pe✓er✓rs✓sp✓pa✓ar✓rc✓c
- These two options select the processor for which
- the code is optimised.
-
-
-
-
- GNU Tools 1993/10/13 35
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- With -✓-m✓mc✓cy✓yp✓pr✓re✓es✓ss✓s (the default), the compiler optimis-
- es code for the Cypress CY7C602 chip, as used in
- the SparcStation/SparcSever 3xx series. This is al-
- so apropriate for the older SparcStation 1, 2, IPX
- etc.
-
- With -✓-m✓ms✓su✓up✓pe✓er✓rs✓sp✓pa✓ar✓rc✓c the compiler optimises code for
- the SuperSparc cpu, as used in the SparcStation 10,
- 1000 and 2000 series. This flag also enables use of
- the full SPARC v8 instruction set.
-
- These `-✓-m✓m' options are defined for the Convex:
-
- -✓-m✓mc✓c1✓1 Generate output for a C1. This is the default when
- the compiler is configured for a C1.
-
- -✓-m✓mc✓c2✓2 Generate output for a C2. This is the default when
- the compiler is configured for a C2.
-
- -✓-m✓ma✓ar✓rg✓gc✓co✓ou✓un✓nt✓t
- Generate code which puts an argument count in the
- word preceding each argument list. Some non-
- portable Convex and Vax programs need this word.
- (Debuggers don't, except for functions with vari-
- able-length argument lists; this info is in the
- symbol table.)
-
- -✓-m✓mn✓no✓oa✓ar✓rg✓gc✓co✓ou✓un✓nt✓t
- Omit the argument count word. This is the default
- if you use the unmodified sources.
-
- These `-✓-m✓m' options are defined for the AMD Am29000:
-
- -✓-m✓md✓dw✓w Generate code that assumes the DW bit is set, i.e.,
- that byte and halfword operations are directly sup-
- ported by the hardware. This is the default.
-
- -✓-m✓mn✓no✓od✓dw✓w Generate code that assumes the DW bit is not set.
-
- -✓-m✓mb✓bw✓w Generate code that assumes the system supports byte
- and halfword write operations. This is the de-
- fault.
-
- -✓-m✓mn✓nb✓bw✓w Generate code that assumes the systems does not
- support byte and halfword write operations. This
- implies `-✓-m✓mn✓no✓od✓dw✓w'.
-
- -✓-m✓ms✓sm✓ma✓al✓ll✓l
- Use a small memory model that assumes that all
- function addresses are either within a single 256
- KB segment or at an absolute address of less than
- 256K. This allows the c✓ca✓al✓ll✓l instruction to be used
- instead of a c✓co✓on✓ns✓st✓t, c✓co✓on✓ns✓st✓th✓h, c✓ca✓al✓ll✓li✓i sequence.
-
-
-
-
- GNU Tools 1993/10/13 36
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-m✓ml✓la✓ar✓rg✓ge✓e
- Do not assume that the c✓ca✓al✓ll✓l instruction can be
- used; this is the default.
-
- -✓-m✓m2✓29✓90✓05✓50✓0
- Generate code for the Am29050.
-
- -✓-m✓m2✓29✓90✓00✓00✓0
- Generate code for the Am29000. This is the de-
- fault.
-
- -✓-m✓mk✓ke✓er✓rn✓ne✓el✓l-✓-r✓re✓eg✓gi✓is✓st✓te✓er✓rs✓s
- Generate references to registers g✓gr✓r6✓64✓4-✓-g✓gr✓r9✓95✓5 instead
- of g✓gr✓r9✓96✓6-✓-g✓gr✓r1✓12✓27✓7. This option can be used when com-
- piling kernel code that wants a set of global reg-
- isters disjoint from that used by user-mode code.
-
- Note that when this option is used, register names
- in `-✓-f✓f' flags must use the normal, user-mode,
- names.
-
- -✓-m✓mu✓us✓se✓er✓r-✓-r✓re✓eg✓gi✓is✓st✓te✓er✓rs✓s
- Use the normal set of global registers, g✓gr✓r9✓96✓6-✓-g✓gr✓r1✓12✓27✓7.
- This is the default.
-
- -✓-m✓ms✓st✓ta✓ac✓ck✓k-✓-c✓ch✓he✓ec✓ck✓k
- Insert a call to _✓__✓_m✓ms✓sp✓p_✓_c✓ch✓he✓ec✓ck✓k after each stack ad-
- justment. This is often used for kernel code.
-
- These `-✓-m✓m' options are defined for Motorola 88K architec-
- tures:
-
- -✓-m✓m8✓88✓80✓00✓00✓0
- Generate code that works well on both the m88100
- and the m88110.
-
- -✓-m✓m8✓88✓81✓10✓00✓0
- Generate code that works best for the m88100, but
- that also runs on the m88110.
-
- -✓-m✓m8✓88✓81✓11✓10✓0
- Generate code that works best for the m88110, and
- may not run on the m88100.
-
- -✓-m✓mi✓id✓de✓en✓nt✓ti✓if✓fy✓y-✓-r✓re✓ev✓vi✓is✓si✓io✓on✓n
- Include an i✓id✓de✓en✓nt✓t directive in the assembler output
- recording the source file name, compiler name and
- version, timestamp, and compilation flags used.
-
- -✓-m✓mn✓no✓o-✓-u✓un✓nd✓de✓er✓rs✓sc✓co✓or✓re✓es✓s
- In assembler output, emit symbol names without
- adding an underscore character at the beginning of
- each name. The default is to use an underscore as
- prefix on each name.
-
-
-
- GNU Tools 1993/10/13 37
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-m✓mn✓no✓o-✓-c✓ch✓he✓ec✓ck✓k-✓-z✓ze✓er✓ro✓o-✓-d✓di✓iv✓vi✓is✓si✓io✓on✓n
-
- -✓-m✓mc✓ch✓he✓ec✓ck✓k-✓-z✓ze✓er✓ro✓o-✓-d✓di✓iv✓vi✓is✓si✓io✓on✓n
- Early models of the 88K architecture had problems
- with division by zero; in particular, many of them
- didn't trap. Use these options to avoid including
- (or to include explicitly) additional code to de-
- tect division by zero and signal an exception. All
- GCC configurations for the 88K use
- `-✓-m✓mc✓ch✓he✓ec✓ck✓k-✓-z✓ze✓er✓ro✓o-✓-d✓di✓iv✓vi✓is✓si✓io✓on✓n' by default.
-
- -✓-m✓mo✓oc✓cs✓s-✓-d✓de✓eb✓bu✓ug✓g-✓-i✓in✓nf✓fo✓o
-
- -✓-m✓mn✓no✓o-✓-o✓oc✓cs✓s-✓-d✓de✓eb✓bu✓ug✓g-✓-i✓in✓nf✓fo✓o
- Include (or omit) additional debugging information
- (about registers used in each stack frame) as spec-
- ified in the 88Open Object Compatibility Standard,
- "OCS". This extra information is not needed by
- GDB. The default for DG/UX, SVr4, and Delta 88
- SVr3.2 is to include this information; other 88k
- configurations omit this information by default.
-
- -✓-m✓mo✓oc✓cs✓s-✓-f✓fr✓ra✓am✓me✓e-✓-p✓po✓os✓si✓it✓ti✓io✓on✓n
-
- -✓-m✓mn✓no✓o-✓-o✓oc✓cs✓s-✓-f✓fr✓ra✓am✓me✓e-✓-p✓po✓os✓si✓it✓ti✓io✓on✓n
- Force (or do not require) register values to be
- stored in a particular place in stack frames, as
- specified in OCS. The DG/UX, Delta88 SVr3.2, and
- BCS configurations use `-✓-m✓mo✓oc✓cs✓s-✓-f✓fr✓ra✓am✓me✓e-✓-p✓po✓os✓si✓it✓ti✓io✓on✓n'; oth-
- er 88k configurations have the default
- `-✓-m✓mn✓no✓o-✓-o✓oc✓cs✓s-✓-f✓fr✓ra✓am✓me✓e-✓-p✓po✓os✓si✓it✓ti✓io✓on✓n'.
-
- -✓-m✓mo✓op✓pt✓ti✓im✓mi✓iz✓ze✓e-✓-a✓ar✓rg✓g-✓-a✓ar✓re✓ea✓a
-
- -✓-m✓mn✓no✓o-✓-o✓op✓pt✓ti✓im✓mi✓iz✓ze✓e-✓-a✓ar✓rg✓g-✓-a✓ar✓re✓ea✓a
- Control how to store function arguments in stack
- frames. `-✓-m✓mo✓op✓pt✓ti✓im✓mi✓iz✓ze✓e-✓-a✓ar✓rg✓g-✓-a✓ar✓re✓ea✓a' saves space, but may
- break some debuggers (not GDB).
- `-✓-m✓mn✓no✓o-✓-o✓op✓pt✓ti✓im✓mi✓iz✓ze✓e-✓-a✓ar✓rg✓g-✓-a✓ar✓re✓ea✓a' conforms better to stan-
- dards. By default GCC does not optimize the argu-
- ment area.
-
- -✓-m✓ms✓sh✓ho✓or✓rt✓t-✓-d✓da✓at✓ta✓a-✓-_✓n_✓u_✓m
- _✓n_✓u_✓m Generate smaller data references by making them
- relative to r✓r0✓0, which allows loading a value using
- a single instruction (rather than the usual two).
- You control which data references are affected by
- specifying _✓n_✓u_✓m with this option. For example, if
- you specify `-✓-m✓ms✓sh✓ho✓or✓rt✓t-✓-d✓da✓at✓ta✓a-✓-5✓51✓12✓2', then the data ref-
- erences affected are those involving displacements
- of less than 512 bytes. `-✓-m✓ms✓sh✓ho✓or✓rt✓t-✓-d✓da✓at✓ta✓a-✓-_✓n_✓u_✓m' is not
- effective for _✓n_✓u_✓m greater than 64K.
-
- -✓-m✓ms✓se✓er✓ri✓ia✓al✓li✓iz✓ze✓e-✓-v✓vo✓ol✓la✓at✓ti✓il✓le✓e
-
-
-
- GNU Tools 1993/10/13 38
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-m✓mn✓no✓o-✓-s✓se✓er✓ri✓ia✓al✓li✓iz✓ze✓e-✓-v✓vo✓ol✓la✓at✓ti✓il✓le✓e
- Do, or do not, generate code to guarantee sequen-
- tial consistency of volatile memory references.
-
- GNU CC always guarantees consistency by default,
- for the preferred processor submodel. How this is
- done depends on the submodel.
-
- The m88100 processor does not reorder memory refer-
- ences and so always provides sequential consisten-
- cy. If you use `-✓-m✓m8✓88✓81✓10✓00✓0', GNU CC does not generate
- any special instructions for sequential consisten-
- cy.
-
- The order of memory references made by the m88110
- processor does not always match the order of the
- instructions requesting those references. In par-
- ticular, a load instruction may execute before a
- preceding store instruction. Such reordering vio-
- lates sequential consistency of volatile memory
- references, when there are multiple processors.
- When you use `-✓-m✓m8✓88✓80✓00✓00✓0' or `-✓-m✓m8✓88✓81✓11✓10✓0', GNU CC gener-
- ates special instructions when appropriate, to
- force execution in the proper order.
-
- The extra code generated to guarantee consistency
- may affect the performance of your application. If
- you know that you can safely forgo this guarantee,
- you may use the option `-✓-m✓mn✓no✓o-✓-s✓se✓er✓ri✓ia✓al✓li✓iz✓ze✓e-✓-v✓vo✓ol✓la✓at✓ti✓il✓le✓e'.
-
- If you use the `-✓-m✓m8✓88✓81✓10✓00✓0' option but require sequen-
- tial consistency when running on the m88110 proces-
- sor, you should use `-✓-m✓ms✓se✓er✓ri✓ia✓al✓li✓iz✓ze✓e-✓-v✓vo✓ol✓la✓at✓ti✓il✓le✓e'.
-
- -✓-m✓ms✓sv✓vr✓r4✓4
-
- -✓-m✓ms✓sv✓vr✓r3✓3 Turn on (`-✓-m✓ms✓sv✓vr✓r4✓4') or off (`-✓-m✓ms✓sv✓vr✓r3✓3') compiler ex-
- tensions related to System V release 4 (SVr4).
- This controls the following:
-
- +✓o Which variant of the assembler syntax to emit
- (which you can select independently using
- `-✓-m✓mv✓ve✓er✓rs✓si✓io✓on✓n-✓-0✓03✓3.✓.0✓00✓0').
-
- +✓o `-✓-m✓ms✓sv✓vr✓r4✓4' makes the C preprocessor recognize `#✓#p✓pr✓ra✓ag✓g-✓-
- m✓ma✓a w✓we✓ea✓ak✓k'
-
- +✓o `-✓-m✓ms✓sv✓vr✓r4✓4' makes GCC issue additional declaration di-
- rectives used in SVr4.
-
- `-✓-m✓ms✓sv✓vr✓r3✓3' is the default for all m88K configurations except
- the SVr4 configuration.
-
-
-
-
-
- GNU Tools 1993/10/13 39
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-m✓mt✓tr✓ra✓ap✓p-✓-l✓la✓ar✓rg✓ge✓e-✓-s✓sh✓hi✓if✓ft✓t
-
- -✓-m✓mh✓ha✓an✓nd✓dl✓le✓e-✓-l✓la✓ar✓rg✓ge✓e-✓-s✓sh✓hi✓if✓ft✓t
- Include code to detect bit-shifts of more than 31
- bits; respectively, trap such shifts or emit code
- to handle them properly. By default GCC makes no
- special provision for large bit shifts.
-
- -✓-m✓mu✓us✓se✓e-✓-d✓di✓iv✓v-✓-i✓in✓ns✓st✓tr✓ru✓uc✓ct✓ti✓io✓on✓n
- Very early models of the 88K architecture didn't
- have a divide instruction, so GCC avoids that in-
- struction by default. Use this option to specify
- that it's safe to use the divide instruction.
-
- -✓-m✓mv✓ve✓er✓rs✓si✓io✓on✓n-✓-0✓03✓3.✓.0✓00✓0
- In the DG/UX configuration, there are two flavors
- of SVr4. This option modifies -✓-m✓ms✓sv✓vr✓r4✓4 to select
- whether the hybrid-COFF or real-ELF flavor is used.
- All other configurations ignore this option.
-
- -✓-m✓mw✓wa✓ar✓rn✓n-✓-p✓pa✓as✓ss✓se✓ed✓d-✓-s✓st✓tr✓ru✓uc✓ct✓ts✓s
- Warn when a function passes a struct as an argument
- or result. Structure-passing conventions have
- changed during the evolution of the C language, and
- are often the source of portability problems. By
- default, GCC issues no such warning.
-
- These options are defined for the IBM RS6000:
-
- -✓-m✓mf✓fp✓p-✓-i✓in✓n-✓-t✓to✓oc✓c
-
- -✓-m✓mn✓no✓o-✓-f✓fp✓p-✓-i✓in✓n-✓-t✓to✓oc✓c
- Control whether or not floating-point constants go
- in the Table of Contents (TOC), a table of all
- global variable and function addresses. By default
- GCC puts floating-point constants there; if the TOC
- overflows, `-✓-m✓mn✓no✓o-✓-f✓fp✓p-✓-i✓in✓n-✓-t✓to✓oc✓c' will reduce the size of
- the TOC, which may avoid the overflow.
-
- These `-✓-m✓m' options are defined for the IBM RT PC:
-
- -✓-m✓mi✓in✓n-✓-l✓li✓in✓ne✓e-✓-m✓mu✓ul✓l
- Use an in-line code sequence for integer multi-
- plies. This is the default.
-
- -✓-m✓mc✓ca✓al✓ll✓l-✓-l✓li✓ib✓b-✓-m✓mu✓ul✓l
- Call l✓lm✓mu✓ul✓l$✓$$✓$ for integer multiples.
-
- -✓-m✓mf✓fu✓ul✓ll✓l-✓-f✓fp✓p-✓-b✓bl✓lo✓oc✓ck✓ks✓s
- Generate full-size floating point data blocks, in-
- cluding the minimum amount of scratch space recom-
- mended by IBM. This is the default.
-
-
-
-
-
- GNU Tools 1993/10/13 40
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-m✓mm✓mi✓in✓ni✓im✓mu✓um✓m-✓-f✓fp✓p-✓-b✓bl✓lo✓oc✓ck✓ks✓s
- Do not include extra scratch space in floating
- point data blocks. This results in smaller code,
- but slower execution, since scratch space must be
- allocated dynamically.
-
- -✓-m✓mf✓fp✓p-✓-a✓ar✓rg✓g-✓-i✓in✓n-✓-f✓fp✓pr✓re✓eg✓gs✓s
- Use a calling sequence incompatible with the IBM
- calling convention in which floating point argu-
- ments are passed in floating point registers. Note
- that v✓va✓ar✓ra✓ar✓rg✓gs✓s.✓.h✓h and s✓st✓td✓da✓ar✓rg✓gs✓s.✓.h✓h will not work with
- floating point operands if this option is speci-
- fied.
-
- -✓-m✓mf✓fp✓p-✓-a✓ar✓rg✓g-✓-i✓in✓n-✓-g✓gr✓re✓eg✓gs✓s
- Use the normal calling convention for floating
- point arguments. This is the default.
-
- -✓-m✓mh✓hc✓c-✓-s✓st✓tr✓ru✓uc✓ct✓t-✓-r✓re✓et✓tu✓ur✓rn✓n
- Return structures of more than one word in memory,
- rather than in a register. This provides compati-
- bility with the MetaWare HighC (hc) compiler. Use
- `-✓-f✓fp✓pc✓cc✓c-✓-s✓st✓tr✓ru✓uc✓ct✓t-✓-r✓re✓et✓tu✓ur✓rn✓n' for compatibility with the
- Portable C Compiler (pcc).
-
- -✓-m✓mn✓no✓oh✓hc✓c-✓-s✓st✓tr✓ru✓uc✓ct✓t-✓-r✓re✓et✓tu✓ur✓rn✓n
- Return some structures of more than one word in
- registers, when convenient. This is the default.
- For compatibility with the IBM-supplied compilers,
- use either `-✓-f✓fp✓pc✓cc✓c-✓-s✓st✓tr✓ru✓uc✓ct✓t-✓-r✓re✓et✓tu✓ur✓rn✓n' or
- `-✓-m✓mh✓hc✓c-✓-s✓st✓tr✓ru✓uc✓ct✓t-✓-r✓re✓et✓tu✓ur✓rn✓n'.
-
- These `-✓-m✓m' options are defined for the MIPS family of com-
- puters:
-
- -✓-m✓mc✓cp✓pu✓u=✓=_✓c_✓p_✓u_✓-_✓t_✓y_✓p_✓e
- Assume the defaults for the machine type _✓c_✓p_✓u_✓-_✓t_✓y_✓p_✓e
- when scheduling instructions. The default _✓c_✓p_✓u_✓-_✓t_✓y_✓p_✓e
- is d✓de✓ef✓fa✓au✓ul✓lt✓t, which picks the longest cycles times
- for any of the machines, in order that the code run
- at reasonable rates on all MIPS cpu's. Other
- choices for _✓c_✓p_✓u_✓-_✓t_✓y_✓p_✓e are r✓r2✓20✓00✓00✓0, r✓r3✓30✓00✓00✓0, r✓r4✓40✓00✓00✓0, and
- r✓r6✓60✓00✓00✓0. While picking a specific _✓c_✓p_✓u_✓-_✓t_✓y_✓p_✓e will
- schedule things appropriately for that particular
- chip, the compiler will not generate any code that
- does not meet level 1 of the MIPS ISA (instruction
- set architecture) without the -✓-m✓mi✓ip✓ps✓s2✓2 or -✓-m✓mi✓ip✓ps✓s3✓3
- switches being used.
-
- -✓-m✓mi✓ip✓ps✓s2✓2 Issue instructions from level 2 of the MIPS ISA
- (branch likely, square root instructions). The
- -✓-m✓mc✓cp✓pu✓u=✓=r✓r4✓40✓00✓00✓0 or -✓-m✓mc✓cp✓pu✓u=✓=r✓r6✓60✓00✓00✓0 switch must be used in
- conjunction with -✓-m✓mi✓ip✓ps✓s2✓2.
-
-
-
-
- GNU Tools 1993/10/13 41
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-m✓mi✓ip✓ps✓s3✓3 Issue instructions from level 3 of the MIPS ISA (64
- bit instructions). The -✓-m✓mc✓cp✓pu✓u=✓=r✓r4✓40✓00✓00✓0 switch must be
- used in conjunction with -✓-m✓mi✓ip✓ps✓s2✓2.
-
- -✓-m✓mi✓in✓nt✓t6✓64✓4
-
- -✓-m✓ml✓lo✓on✓ng✓g6✓64✓4
-
- -✓-m✓ml✓lo✓on✓ng✓gl✓lo✓on✓ng✓g1✓12✓28✓8
- These options don't work at present.
-
- -✓-m✓mm✓mi✓ip✓ps✓s-✓-a✓as✓s
- Generate code for the MIPS assembler, and invoke
- m✓mi✓ip✓ps✓s-✓-t✓tf✓fi✓il✓le✓e to add normal debug information. This
- is the default for all platforms except for the
- OSF/1 reference platform, using the OSF/rose object
- format. If any of the -✓-g✓gg✓gd✓db✓b, -✓-g✓gs✓st✓ta✓ab✓bs✓s, or -✓-g✓gs✓st✓ta✓ab✓bs✓s+✓+
- switches are used, the m✓mi✓ip✓ps✓s-✓-t✓tf✓fi✓il✓le✓e program will en-
- capsulate the stabs within MIPS ECOFF.
-
- -✓-m✓mg✓ga✓as✓s Generate code for the GNU assembler. This is the
- default on the OSF/1 reference platform, using the
- OSF/rose object format.
-
- -✓-m✓mr✓rn✓na✓am✓me✓es✓s
-
- -✓-m✓mn✓no✓o-✓-r✓rn✓na✓am✓me✓es✓s
- The -✓-m✓mr✓rn✓na✓am✓me✓es✓s switch says to output code using the
- MIPS software names for the registers, instead of
- the hardware names (ie, a✓a0✓0 instead of $✓$4✓4). The GNU
- assembler does not support the -✓-m✓mr✓rn✓na✓am✓me✓es✓s switch, and
- the MIPS assembler will be instructed to run the
- MIPS C preprocessor over the source file. The
- -✓-m✓mn✓no✓o-✓-r✓rn✓na✓am✓me✓es✓s switch is default.
-
- -✓-m✓mg✓gp✓po✓op✓pt✓t
-
- -✓-m✓mn✓no✓o-✓-g✓gp✓po✓op✓pt✓t
- The -✓-m✓mg✓gp✓po✓op✓pt✓t switch says to write all of the data
- declarations before the instructions in the text
- section, to all the MIPS assembler to generate one
- word memory references instead of using two words
- for short global or static data items. This is on
- by default if optimization is selected.
-
- -✓-m✓ms✓st✓ta✓at✓ts✓s
-
- -✓-m✓mn✓no✓o-✓-s✓st✓ta✓at✓ts✓s
- For each non-inline function processed, the -✓-m✓ms✓st✓ta✓at✓ts✓s
- switch causes the compiler to emit one line to the
- standard error file to print statistics about the
- program (number of registers saved, stack size,
- etc.).
-
-
-
-
- GNU Tools 1993/10/13 42
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-m✓mm✓me✓em✓mc✓cp✓py✓y
-
- -✓-m✓mn✓no✓o-✓-m✓me✓em✓mc✓cp✓py✓y
- The -✓-m✓mm✓me✓em✓mc✓cp✓py✓y switch makes all block moves call the
- appropriate string function (m✓me✓em✓mc✓cp✓py✓y or b✓bc✓co✓op✓py✓y) in-
- stead of possibly generating inline code.
-
- -✓-m✓mm✓mi✓ip✓ps✓s-✓-t✓tf✓fi✓il✓le✓e
-
- -✓-m✓mn✓no✓o-✓-m✓mi✓ip✓ps✓s-✓-t✓tf✓fi✓il✓le✓e
- The -✓-m✓mn✓no✓o-✓-m✓mi✓ip✓ps✓s-✓-t✓tf✓fi✓il✓le✓e switch causes the compiler not
- postprocess the object file with the m✓mi✓ip✓ps✓s-✓-t✓tf✓fi✓il✓le✓e
- program, after the MIPS assembler has generated it
- to add debug support. If m✓mi✓ip✓ps✓s-✓-t✓tf✓fi✓il✓le✓e is not run,
- then no local variables will be available to the
- debugger. In addition, s✓st✓ta✓ag✓ge✓e2✓2 and s✓st✓ta✓ag✓ge✓e3✓3 objects
- will have the temporary file names passed to the
- assembler embedded in the object file, which means
- the objects will not compare the same.
-
- -✓-m✓ms✓so✓of✓ft✓t-✓-f✓fl✓lo✓oa✓at✓t
- Generate output containing library calls for float-
- ing point. _✓W_✓A_✓R_✓N_✓I_✓N_✓G_✓: the requisite libraries are
- not part of GNU CC. Normally the facilities of the
- machine's usual C compiler are used, but this can't
- be done directly in cross-compilation. You must
- make your own arrangements to provide suitable li-
- brary functions for cross-compilation.
-
- -✓-m✓mh✓ha✓ar✓rd✓d-✓-f✓fl✓lo✓oa✓at✓t
- Generate output containing floating point instruc-
- tions. This is the default if you use the unmodi-
- fied sources.
-
- -✓-m✓mf✓fp✓p6✓64✓4 Assume that the F✓FR✓R bit in the status word is on,
- and that there are 32 64-bit floating point regis-
- ters, instead of 32 32-bit floating point regis-
- ters. You must also specify the -✓-m✓mc✓cp✓pu✓u=✓=r✓r4✓40✓00✓00✓0 and
- -✓-m✓mi✓ip✓ps✓s3✓3 switches.
-
- -✓-m✓mf✓fp✓p3✓32✓2 Assume that there are 32 32-bit floating point reg-
- isters. This is the default.
-
- -✓-m✓ma✓ab✓bi✓ic✓ca✓al✓ll✓ls✓s
-
- -✓-m✓mn✓no✓o-✓-a✓ab✓bi✓ic✓ca✓al✓ll✓ls✓s
- Emit (or do not emit) the .✓.a✓ab✓bi✓ic✓ca✓al✓ll✓ls✓s, .✓.c✓cp✓pl✓lo✓oa✓ad✓d, and
- .✓.c✓cp✓pr✓re✓es✓st✓to✓or✓re✓e pseudo operations that some System V.4
- ports use for position independent code.
-
- -✓-m✓mh✓ha✓al✓lf✓f-✓-p✓pi✓ic✓c
-
- -✓-m✓mn✓no✓o-✓-h✓ha✓al✓lf✓f-✓-p✓pi✓ic✓c
- The -✓-m✓mh✓ha✓al✓lf✓f-✓-p✓pi✓ic✓c switch says to put pointers to ex-
-
-
-
- GNU Tools 1993/10/13 43
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- tern references into the data section and load them
- up, rather than put the references in the text sec-
- tion. This option does not work at present. -✓-G✓G_✓n_✓u_✓m
- Put global and static items less than or equal to
- _✓n_✓u_✓m bytes into the small data or bss sections in-
- stead of the normal data or bss section. This al-
- lows the assembler to emit one word memory refer-
- ence instructions based on the global pointer (g✓gp✓p
- or $✓$2✓28✓8), instead of the normal two words used. By
- default, _✓n_✓u_✓m is 8 when the MIPS assembler is used,
- and 0 when the GNU assembler is used. The -✓-G✓G_✓n_✓u_✓m
- switch is also passed to the assembler and linker.
- All modules should be compiled with the same -✓-G✓G_✓n_✓u_✓m
- value.
-
- -✓-n✓no✓oc✓cp✓pp✓p Tell the MIPS assembler to not run it's preproces-
- sor over user assembler files (with a `.✓.s✓s' suffix)
- when assembling them.
-
- These `-✓-m✓m' options are defined for the Intel 80386 family
- of computers: -✓-m✓m4✓48✓86✓6
-
- -✓-m✓mn✓no✓o-✓-4✓48✓86✓6
- Control whether or not code is optimized for a 486
- instead of an 386. Code generated for a 486 will
- run on a 386 and vice versa.
-
- -✓-m✓ms✓so✓of✓ft✓t-✓-f✓fl✓lo✓oa✓at✓t
- Generate output containing library calls for float-
- ing point. _✓W_✓a_✓r_✓n_✓i_✓n_✓g_✓: the requisite libraries are
- not part of GNU CC. Normally the facilities of the
- machine's usual C compiler are used, but this can't
- be done directly in cross-compilation. You must
- make your own arrangements to provide suitable li-
- brary functions for cross-compilation.
-
- On machines where a function returns floating point
- results in the 80387 register stack, some floating
- point opcodes may be emitted even if `-✓-m✓ms✓so✓of✓ft✓t-✓-f✓fl✓lo✓oa✓at✓t'
- is used.
-
- -✓-m✓mn✓no✓o-✓-f✓fp✓p-✓-r✓re✓et✓t-✓-i✓in✓n-✓-3✓38✓87✓7
- Do not use the FPU registers for return values of
- functions.
-
- The usual calling convention has functions return
- values of types f✓fl✓lo✓oa✓at✓t and d✓do✓ou✓ub✓bl✓le✓e in an FPU regis-
- ter, even if there is no FPU. The idea is that the
- operating system should emulate an FPU.
-
- The option `-✓-m✓mn✓no✓o-✓-f✓fp✓p-✓-r✓re✓et✓t-✓-i✓in✓n-✓-3✓38✓87✓7' causes such values
- to be returned in ordinary CPU registers instead.
-
- These `-✓-m✓m' options are defined for the HPPA family of com-
-
-
-
- GNU Tools 1993/10/13 44
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- puters:
-
- -✓-m✓mp✓pa✓a-✓-r✓ri✓is✓sc✓c-✓-1✓1-✓-0✓0
- Generate code for a PA 1.0 processor.
-
- -✓-m✓mp✓pa✓a-✓-r✓ri✓is✓sc✓c-✓-1✓1-✓-1✓1
- Generate code for a PA 1.1 processor.
-
- -✓-m✓mk✓ke✓er✓rn✓ne✓el✓l
- Generate code which is suitable for use in kernels.
- Specifically, avoid a✓ad✓dd✓d instructions in which one
- of the arguments is the DP register; generate a✓ad✓dd✓di✓il✓l
- instructions instead. This avoids a rather serious
- bug in the HP-UX linker.
-
- -✓-m✓ms✓sh✓ha✓ar✓re✓ed✓d-✓-l✓li✓ib✓bs✓s
- Generate code that can be linked against HP-UX
- shared libraries. This option is not fully func-
- tion yet, and is not on by default for any PA tar-
- get. Using this option can cause incorrect code to
- be generated by the compiler.
-
- -✓-m✓mn✓no✓o-✓-s✓sh✓ha✓ar✓re✓ed✓d-✓-l✓li✓ib✓bs✓s
- Don't generate code that will be linked against
- shared libraries. This is the default for all PA
- targets.
-
- -✓-m✓ml✓lo✓on✓ng✓g-✓-c✓ca✓al✓ll✓ls✓s
- Generate code which allows calls to functions
- greater than 256K away from the caller when the
- caller and callee are in the same source file. Do
- not turn this option on unless code refuses to link
- with "branch out of range errors from the linker.
-
- -✓-m✓md✓di✓is✓sa✓ab✓bl✓le✓e-✓-f✓fp✓pr✓re✓eg✓gs✓s
- Prevent floating point registers from being used in
- any manner. This is necessary for compiling ker-
- nels which perform lazy context switching of float-
- ing point registers. If you use this option and
- attempt to perform floating point operations, the
- compiler will abort.
-
- -✓-m✓md✓di✓is✓sa✓ab✓bl✓le✓e-✓-i✓in✓nd✓de✓ex✓xi✓in✓ng✓g
- Prevent the compiler from using indexing address
- modes. This avoids some rather obscure problems
- when compiling MIG generated code under MACH.
-
- -✓-m✓mt✓tr✓ra✓ai✓il✓li✓in✓ng✓g-✓-c✓co✓ol✓lo✓on✓n
- Add a colon to the end of label definitions (for
- ELF assemblers).
-
- These `-✓-m✓m' options are defined for the Intel 80960 family
- of computers:
-
-
-
-
- GNU Tools 1993/10/13 45
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-m✓m_✓c_✓p_✓u_✓-_✓t_✓y_✓p_✓e
- Assume the defaults for the machine type _✓c_✓p_✓u_✓-_✓t_✓y_✓p_✓e
- for instruction and addressing-mode availability
- and alignment. The default _✓c_✓p_✓u_✓-_✓t_✓y_✓p_✓e is k✓kb✓b; other
- choices are k✓ka✓a, m✓mc✓c, c✓ca✓a, c✓cf✓f, s✓sa✓a, and s✓sb✓b.
-
- -✓-m✓mn✓nu✓um✓me✓er✓ri✓ic✓cs✓s
-
- -✓-m✓ms✓so✓of✓ft✓t-✓-f✓fl✓lo✓oa✓at✓t
- The -✓-m✓mn✓nu✓um✓me✓er✓ri✓ic✓cs✓s option indicates that the processor
- does support floating-point instructions. The
- -✓-m✓ms✓so✓of✓ft✓t-✓-f✓fl✓lo✓oa✓at✓t option indicates that floating-point
- support should not be assumed.
-
- -✓-m✓ml✓le✓ea✓af✓f-✓-p✓pr✓ro✓oc✓ce✓ed✓du✓ur✓re✓es✓s
-
- -✓-m✓mn✓no✓o-✓-l✓le✓ea✓af✓f-✓-p✓pr✓ro✓oc✓ce✓ed✓du✓ur✓re✓es✓s
- Do (or do not) attempt to alter leaf procedures to
- be callable with the _✓b_✓a_✓l instruction as well as
- _✓c_✓a_✓l_✓l. This will result in more efficient code for
- explicit calls when the _✓b_✓a_✓l instruction can be sub-
- stituted by the assembler or linker, but less effi-
- cient code in other cases, such as calls via func-
- tion pointers, or using a linker that doesn't sup-
- port this optimization.
-
- -✓-m✓mt✓ta✓ai✓il✓l-✓-c✓ca✓al✓ll✓l
-
- -✓-m✓mn✓no✓o-✓-t✓ta✓ai✓il✓l-✓-c✓ca✓al✓ll✓l
- Do (or do not) make additional attempts (beyond
- those of the machine-independent portions of the
- compiler) to optimize tail-recursive calls into
- branches. You may not want to do this because the
- detection of cases where this is not valid is not
- totally complete. The default is -✓-m✓mn✓no✓o-✓-t✓ta✓ai✓il✓l-✓-c✓ca✓al✓ll✓l.
-
- -✓-m✓mc✓co✓om✓mp✓pl✓le✓ex✓x-✓-a✓ad✓dd✓dr✓r
-
- -✓-m✓mn✓no✓o-✓-c✓co✓om✓mp✓pl✓le✓ex✓x-✓-a✓ad✓dd✓dr✓r
- Assume (or do not assume) that the use of a complex
- addressing mode is a win on this implementation of
- the i960. Complex addressing modes may not be
- worthwhile on the K-series, but they definitely are
- on the C-series. The default is currently -✓-m✓mc✓co✓om✓m-✓-
- p✓pl✓le✓ex✓x-✓-a✓ad✓dd✓dr✓r for all processors except the CB and CC.
-
- -✓-m✓mc✓co✓od✓de✓e-✓-a✓al✓li✓ig✓gn✓n
-
- -✓-m✓mn✓no✓o-✓-c✓co✓od✓de✓e-✓-a✓al✓li✓ig✓gn✓n
- Align code to 8-byte boundaries for faster fetching
- (or don't bother). Currently turned on by default
- for C-series implementations only.
-
-
-
-
-
- GNU Tools 1993/10/13 46
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- -✓-m✓mi✓ic✓c-✓-c✓co✓om✓mp✓pa✓at✓t
-
- -✓-m✓mi✓ic✓c2✓2.✓.0✓0-✓-c✓co✓om✓mp✓pa✓at✓t
-
- -✓-m✓mi✓ic✓c3✓3.✓.0✓0-✓-c✓co✓om✓mp✓pa✓at✓t
- Enable compatibility with iC960 v2.0 or v3.0.
-
- -✓-m✓ma✓as✓sm✓m-✓-c✓co✓om✓mp✓pa✓at✓t
-
- -✓-m✓mi✓in✓nt✓te✓el✓l-✓-a✓as✓sm✓m
- Enable compatibility with the iC960 assembler.
-
- -✓-m✓ms✓st✓tr✓ri✓ic✓ct✓t-✓-a✓al✓li✓ig✓gn✓n
-
- -✓-m✓mn✓no✓o-✓-s✓st✓tr✓ri✓ic✓ct✓t-✓-a✓al✓li✓ig✓gn✓n
- Do not permit (do permit) unaligned accesses.
-
- -✓-m✓mo✓ol✓ld✓d-✓-a✓al✓li✓ig✓gn✓n
- Enable structure-alignment compatibility with In-
- tel's gcc release version 1.3 (based on gcc 1.37).
- Currently this is buggy in that #✓#p✓pr✓ra✓ag✓gm✓ma✓a a✓al✓li✓ig✓gn✓n 1✓1 is
- always assumed as well, and cannot be turned off.
-
- These `-✓-m✓m' options are defined for the DEC Alpha implemen-
- tations:
-
- -✓-m✓mn✓no✓o-✓-s✓so✓of✓ft✓t-✓-f✓fl✓lo✓oa✓at✓t
-
- -✓-m✓ms✓so✓of✓ft✓t-✓-f✓fl✓lo✓oa✓at✓t
- Use (do not use) the hardware floating-point in-
- structions for floating-point operations. When
- -✓-m✓ms✓so✓of✓ft✓t-✓-f✓fl✓lo✓oa✓at✓t is specified, functions in `l✓li✓ib✓bg✓gc✓cc✓c1✓1.✓.c✓c'
- will be used to perform floating-point operations.
- Unless they are replaced by routines that emulate
- the floating-point operations, or compiled in such
- a way as to call such emulations routines, these
- routines will issue floating-point operations. If
- you are compiling for an Alpha without floating-
- point operations, you must ensure that the library
- is built so as not to call them.
-
- Note that Alpha implementations without floating-
- point operations are required to have floating-
- point registers.
-
- -✓-m✓mf✓fp✓p-✓-r✓re✓eg✓g
-
- -✓-m✓mn✓no✓o-✓-f✓fp✓p-✓-r✓re✓eg✓gs✓s
- Generate code that uses (does not use) the float-
- ing-point register set. -✓-m✓mn✓no✓o-✓-f✓fp✓p-✓-r✓re✓eg✓gs✓s implies
- -✓-m✓ms✓so✓of✓ft✓t-✓-f✓fl✓lo✓oa✓at✓t. If the floating-point register set
- is not used, floating point operands are passed in
- integer registers as if they were integers and
- floating-point results are passed in $0 instead of
-
-
-
- GNU Tools 1993/10/13 47
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- $f0. This is a non-standard calling sequence, so
- any function with a floating-point argument or re-
- turn value called by code compiled with -✓-m✓mn✓no✓o-✓-f✓fp✓p-✓-
- r✓re✓eg✓gs✓s must also be compiled with that option.
-
- A typical use of this option is building a kernel
- that does not use, and hence need not save and re-
- store, any floating-point registers.
-
- These additional options are available on System V Release
- 4 for compatibility with other compilers on those systems:
-
- -✓-G✓G On SVr4 systems, g✓gc✓cc✓c accepts the option `-✓-G✓G' (and
- passes it to the system linker), for compatibility
- with other compilers. However, we suggest you use
- `-✓-s✓sy✓ym✓mb✓bo✓ol✓li✓ic✓c' or `-✓-s✓sh✓ha✓ar✓re✓ed✓d' as appropriate, instead of
- supplying linker options on the g✓gc✓cc✓c command line.
-
- -✓-Q✓Qy✓y Identify the versions of each tool used by the com-
- piler, in a .✓.i✓id✓de✓en✓nt✓t assembler directive in the out-
- put.
-
- -✓-Q✓Qn✓n Refrain from adding .✓.i✓id✓de✓en✓nt✓t directives to the output
- file (this is the default).
-
- -✓-Y✓YP✓P,✓,_✓d_✓i_✓r_✓s
- Search the directories _✓d_✓i_✓r_✓s, and no others, for li-
- braries specified with `-✓-l✓l'. You can separate di-
- rectory entries in _✓d_✓i_✓r_✓s from one another with
- colons.
-
- -✓-Y✓Ym✓m,✓,_✓d_✓i_✓r
- Look in the directory _✓d_✓i_✓r to find the M4 preproces-
- sor. The assembler uses this option.
-
- C✓CO✓OD✓DE✓E G✓GE✓EN✓NE✓ER✓RA✓AT✓TI✓IO✓ON✓N O✓OP✓PT✓TI✓IO✓ON✓NS✓S
- These machine-independent options control the interface
- conventions used in code generation.
-
- Most of them begin with `-f'. These options have both
- positive and negative forms; the negative form of `-✓-f✓ff✓fo✓oo✓o'
- would be `-✓-f✓fn✓no✓o-✓-f✓fo✓oo✓o'. In the table below, only one of the
- forms is listed--the one which is not the default. You
- can figure out the other form by either removing `n✓no✓o-✓-' or
- adding it.
-
- -✓-f✓fn✓no✓on✓nn✓nu✓ul✓ll✓l-✓-o✓ob✓bj✓je✓ec✓ct✓ts✓s
- Assume that objects reached through references are
- not null (C++ only).
-
- Normally, GNU C++ makes conservative assumptions
- about objects reached through references. For ex-
- ample, the compiler must check that a✓a is not null
- in code like the following:
-
-
-
- GNU Tools 1993/10/13 48
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- obj &a = g (); a.f (2);
-
- Checking that references of this sort have non-null
- values requires extra code, however, and it is un-
- necessary for many programs. You can use
- `-✓-f✓fn✓no✓on✓nn✓nu✓ul✓ll✓l-✓-o✓ob✓bj✓je✓ec✓ct✓ts✓s' to omit the checks for null, if
- your program doesn't require checking.
-
- -✓-f✓fp✓pc✓cc✓c-✓-s✓st✓tr✓ru✓uc✓ct✓t-✓-r✓re✓et✓tu✓ur✓rn✓n
- Use the same convention for returning s✓st✓tr✓ru✓uc✓ct✓t and
- u✓un✓ni✓io✓on✓n values that is used by the usual C compiler
- on your system. This convention is less efficient
- for small structures, and on many machines it fails
- to be reentrant; but it has the advantage of allow-
- ing intercallability between GCC-compiled code and
- PCC-compiled code.
-
- -✓-f✓fr✓re✓eg✓g-✓-s✓st✓tr✓ru✓uc✓ct✓t-✓-r✓re✓et✓tu✓ur✓rn✓n
- Use the convention that s✓st✓tr✓ru✓uc✓ct✓t and u✓un✓ni✓io✓on✓n values are
- returned in registers when possible. This is more
- efficient for small structures than
- -✓-f✓fp✓pc✓cc✓c-✓-s✓st✓tr✓ru✓uc✓ct✓t-✓-r✓re✓et✓tu✓ur✓rn✓n.
-
- If you specify neither -✓-f✓fp✓pc✓cc✓c-✓-s✓st✓tr✓ru✓uc✓ct✓t-✓-r✓re✓et✓tu✓ur✓rn✓n nor
- -✓-f✓fr✓re✓eg✓g-✓-s✓st✓tr✓ru✓uc✓ct✓t-✓-r✓re✓et✓tu✓ur✓rn✓n, GNU CC defaults to whichever
- convention is standard for the target. If there is
- no standard convention, GNU CC defaults to
- -✓-f✓fp✓pc✓cc✓c-✓-s✓st✓tr✓ru✓uc✓ct✓t-✓-r✓re✓et✓tu✓ur✓rn✓n.
-
- -✓-f✓fs✓sh✓ho✓or✓rt✓t-✓-e✓en✓nu✓um✓ms✓s
- Allocate to an e✓en✓nu✓um✓m type only as many bytes as it
- needs for the declared range of possible values.
- Specifically, the e✓en✓nu✓um✓m type will be equivalent to
- the smallest integer type which has enough room.
-
- -✓-f✓fs✓sh✓ho✓or✓rt✓t-✓-d✓do✓ou✓ub✓bl✓le✓e
- Use the same size for d✓do✓ou✓ub✓bl✓le✓e as for f✓fl✓lo✓oa✓at✓t .
-
- -✓-f✓fs✓sh✓ha✓ar✓re✓ed✓d-✓-d✓da✓at✓ta✓a
- Requests that the data and non-c✓co✓on✓ns✓st✓t variables of
- this compilation be shared data rather than private
- data. The distinction makes sense only on certain
- operating systems, where shared data is shared be-
- tween processes running the same program, while
- private data exists in one copy per process.
-
- -✓-f✓fn✓no✓o-✓-c✓co✓om✓mm✓mo✓on✓n
- Allocate even uninitialized global variables in the
- bss section of the object file, rather than gener-
- ating them as common blocks. This has the effect
- that if the same variable is declared (without e✓ex✓x-✓-
- t✓te✓er✓rn✓n) in two different compilations, you will get
- an error when you link them. The only reason this
- might be useful is if you wish to verify that the
-
-
-
- GNU Tools 1993/10/13 49
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- program will work on other systems which always
- work this way.
-
- -✓-f✓fn✓no✓o-✓-i✓id✓de✓en✓nt✓t
- Ignore the `#✓#i✓id✓de✓en✓nt✓t' directive.
-
- -✓-f✓fn✓no✓o-✓-g✓gn✓nu✓u-✓-l✓li✓in✓nk✓ke✓er✓r
- Do not output global initializations (such as C++
- constructors and destructors) in the form used by
- the GNU linker (on systems where the GNU linker is
- the standard method of handling them). Use this
- option when you want to use a non-GNU linker, which
- also requires using the c✓co✓ol✓ll✓le✓ec✓ct✓t2✓2 program to make
- sure the system linker includes constructors and
- destructors. (c✓co✓ol✓ll✓le✓ec✓ct✓t2✓2 is included in the GNU CC
- distribution.) For systems which _✓m_✓u_✓s_✓t use c✓co✓ol✓l-✓-
- l✓le✓ec✓ct✓t2✓2, the compiler driver g✓gc✓cc✓c is configured to do
- this automatically.
-
- -✓-f✓fi✓in✓nh✓hi✓ib✓bi✓it✓t-✓-s✓si✓iz✓ze✓e-✓-d✓di✓ir✓re✓ec✓ct✓ti✓iv✓ve✓e
- Don't output a .✓.s✓si✓iz✓ze✓e assembler directive, or any-
- thing else that would cause trouble if the function
- is split in the middle, and the two halves are
- placed at locations far apart in memory. This op-
- tion is used when compiling `c✓cr✓rt✓ts✓st✓tu✓uf✓ff✓f.✓.c✓c'; you
- should not need to use it for anything else.
-
- -✓-f✓fv✓ve✓er✓rb✓bo✓os✓se✓e-✓-a✓as✓sm✓m
- Put extra commentary information in the generated
- assembly code to make it more readable. This op-
- tion is generally only of use to those who actually
- need to read the generated assembly code (perhaps
- while debugging the compiler itself).
-
- -✓-f✓fv✓vo✓ol✓la✓at✓ti✓il✓le✓e
- Consider all memory references through pointers to
- be volatile.
-
- -✓-f✓fv✓vo✓ol✓la✓at✓ti✓il✓le✓e-✓-g✓gl✓lo✓ob✓ba✓al✓l
- Consider all memory references to extern and global
- data items to be volatile.
-
- -✓-f✓fp✓pi✓ic✓c If supported for the target machines, generate po-
- sition-independent code, suitable for use in a
- shared library.
-
- -✓-f✓fP✓PI✓IC✓C If supported for the target machine, emit position-
- independent code, suitable for dynamic linking,
- even if branches need large displacements.
-
- -✓-f✓ff✓fi✓ix✓xe✓ed✓d-✓-_✓r_✓e_✓g
- Treat the register named _✓r_✓e_✓g as a fixed register;
- generated code should never refer to it (except
- perhaps as a stack pointer, frame pointer or in
-
-
-
- GNU Tools 1993/10/13 50
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- some other fixed role).
-
- _✓r_✓e_✓g must be the name of a register. The register
- names accepted are machine-specific and are defined
- in the R✓RE✓EG✓GI✓IS✓ST✓TE✓ER✓R_✓_N✓NA✓AM✓ME✓ES✓S macro in the machine descrip-
- tion macro file.
-
- This flag does not have a negative form, because it
- specifies a three-way choice.
-
- -✓-f✓fc✓ca✓al✓ll✓l-✓-u✓us✓se✓ed✓d-✓-_✓r_✓e_✓g
- Treat the register named _✓r_✓e_✓g as an allocatable reg-
- ister that is clobbered by function calls. It may
- be allocated for temporaries or variables that do
- not live across a call. Functions compiled this
- way will not save and restore the register _✓r_✓e_✓g.
-
- Use of this flag for a register that has a fixed
- pervasive role in the machine's execution model,
- such as the stack pointer or frame pointer, will
- produce disastrous results.
-
- This flag does not have a negative form, because it
- specifies a three-way choice.
-
- -✓-f✓fc✓ca✓al✓ll✓l-✓-s✓sa✓av✓ve✓ed✓d-✓-_✓r_✓e_✓g
- Treat the register named _✓r_✓e_✓g as an allocatable reg-
- ister saved by functions. It may be allocated even
- for temporaries or variables that live across a
- call. Functions compiled this way will save and
- restore the register _✓r_✓e_✓g if they use it.
-
- Use of this flag for a register that has a fixed
- pervasive role in the machine's execution model,
- such as the stack pointer or frame pointer, will
- produce disastrous results.
-
- A different sort of disaster will result from the
- use of this flag for a register in which function
- values may be returned.
-
- This flag does not have a negative form, because it
- specifies a three-way choice.
-
- P✓PR✓RA✓AG✓GM✓MA✓AS✓S
- Two `#✓#p✓pr✓ra✓ag✓gm✓ma✓a' directives are supported for GNU C++, to
- permit using the same header file for two purposes: as a
- definition of interfaces to a given object class, and as
- the full definition of the contents of that object class.
-
- #✓#p✓pr✓ra✓ag✓gm✓ma✓a i✓in✓nt✓te✓er✓rf✓fa✓ac✓ce✓e
- (C++ only.) Use this directive in header files
- that define object classes, to save space in most
- of the object files that use those classes. Nor-
-
-
-
- GNU Tools 1993/10/13 51
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- mally, local copies of certain information (backup
- copies of inline member functions, debugging infor-
- mation, and the internal tables that implement vir-
- tual functions) must be kept in each object file
- that includes class definitions. You can use this
- pragma to avoid such duplication. When a header
- file containing `#✓#p✓pr✓ra✓ag✓gm✓ma✓a i✓in✓nt✓te✓er✓rf✓fa✓ac✓ce✓e' is included in
- a compilation, this auxiliary information will not
- be generated (unless the main input source file it-
- self uses `#✓#p✓pr✓ra✓ag✓gm✓ma✓a i✓im✓mp✓pl✓le✓em✓me✓en✓nt✓ta✓at✓ti✓io✓on✓n'). Instead, the
- object files will contain references to be resolved
- at link time.
-
- #✓#p✓pr✓ra✓ag✓gm✓ma✓a i✓im✓mp✓pl✓le✓em✓me✓en✓nt✓ta✓at✓ti✓io✓on✓n
-
- #✓#p✓pr✓ra✓ag✓gm✓ma✓a i✓im✓mp✓pl✓le✓em✓me✓en✓nt✓ta✓at✓ti✓io✓on✓n "✓"_✓o_✓b_✓j_✓e_✓c_✓t_✓s.✓.h✓h"✓"
- (C++ only.) Use this pragma in a main input file,
- when you want full output from included header
- files to be generated (and made globally visible).
- The included header file, in turn, should use
- `#✓#p✓pr✓ra✓ag✓gm✓ma✓a i✓in✓nt✓te✓er✓rf✓fa✓ac✓ce✓e'. Backup copies of inline mem-
- ber functions, debugging information, and the in-
- ternal tables used to implement virtual functions
- are all generated in implementation files.
-
- If you use `#✓#p✓pr✓ra✓ag✓gm✓ma✓a i✓im✓mp✓pl✓le✓em✓me✓en✓nt✓ta✓at✓ti✓io✓on✓n' with no argu-
- ment, it applies to an include file with the same
- basename as your source file; for example, in
- `a✓al✓ll✓lc✓cl✓la✓as✓ss✓s.✓.c✓cc✓c', `#✓#p✓pr✓ra✓ag✓gm✓ma✓a i✓im✓mp✓pl✓le✓em✓me✓en✓nt✓ta✓at✓ti✓io✓on✓n' by itself
- is equivalent to `#✓#p✓pr✓ra✓ag✓gm✓ma✓a i✓im✓mp✓pl✓le✓em✓me✓en✓nt✓ta✓at✓ti✓io✓on✓n
- "✓"a✓al✓ll✓lc✓cl✓la✓as✓ss✓s.✓.h✓h"✓"'. Use the string argument if you want
- a single implementation file to include code from
- multiple header files.
-
- There is no way to split up the contents of a sin-
- gle header file into multiple implementation files.
-
- F✓FI✓IL✓LE✓ES✓S
- file.c C source file
- file.h C header (preprocessor) file
- file.i preprocessed C source file
- file.C C++ source file
- file.cc C++ source file
- file.cxx C++ source file
- file.m Objective-C source file
- file.s assembly language file
- file.o object file
- a.out link edited output
- _✓T_✓M_✓P_✓D_✓I_✓R/cc* temporary files
- _✓L_✓I_✓B_✓D_✓I_✓R/cpp preprocessor
- _✓L_✓I_✓B_✓D_✓I_✓R/cc1 compiler for C
- _✓L_✓I_✓B_✓D_✓I_✓R/cc1plus compiler for C++
- _✓L_✓I_✓B_✓D_✓I_✓R/collect linker front end needed on some machines
- _✓L_✓I_✓B_✓D_✓I_✓R/libgcc.a GCC subroutine library
-
-
-
- GNU Tools 1993/10/13 52
-
-
-
-
-
- GCC(1) GNU Tools GCC(1)
-
-
- /lib/crt[01n].o start-up routine
- _✓L_✓I_✓B_✓D_✓I_✓R/ccrt0 additional start-up routine for C++
- /lib/libc.a standard C library, see
- _✓i_✓n_✓t_✓r_✓o(3)
- /usr/include standard directory for #✓#i✓in✓nc✓cl✓lu✓ud✓de✓e files
- _✓L_✓I_✓B_✓D_✓I_✓R/include standard gcc directory for #✓#i✓in✓nc✓cl✓lu✓ud✓de✓e files
- _✓L_✓I_✓B_✓D_✓I_✓R/g++-include additional g++ directory for #✓#i✓in✓nc✓cl✓lu✓ud✓de✓e
-
- _✓L_✓I_✓B_✓D_✓I_✓R is usually /✓/u✓us✓sr✓r/✓/l✓lo✓oc✓ca✓al✓l/✓/l✓li✓ib✓b/✓/_✓m_✓a_✓c_✓h_✓i_✓n_✓e/_✓v_✓e_✓r_✓s_✓i_✓o_✓n.
- _✓T_✓M_✓P_✓D_✓I_✓R comes from the environment variable T✓TM✓MP✓PD✓DI✓IR✓R (default
- /✓/u✓us✓sr✓r/✓/t✓tm✓mp✓p if available, else /✓/t✓tm✓mp✓p).
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- cpp(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1).
- `g✓gc✓cc✓c', `c✓cp✓pp✓p', `a✓as✓s', `l✓ld✓d', and `g✓gd✓db✓b' entries in i✓in✓nf✓fo✓o.
- _✓U_✓s_✓i_✓n_✓g _✓a_✓n_✓d _✓P_✓o_✓r_✓t_✓i_✓n_✓g _✓G_✓N_✓U _✓C_✓C _✓(_✓f_✓o_✓r _✓v_✓e_✓r_✓s_✓i_✓o_✓n _✓2_✓._✓0_✓), Richard M.
- Stallman; _✓T_✓h_✓e _✓C _✓P_✓r_✓e_✓p_✓r_✓o_✓c_✓e_✓s_✓s_✓o_✓r, Richard M. Stallman; _✓D_✓e_✓b_✓u_✓g_✓-
- _✓g_✓i_✓n_✓g _✓w_✓i_✓t_✓h _✓G_✓D_✓B_✓: _✓t_✓h_✓e _✓G_✓N_✓U _✓S_✓o_✓u_✓r_✓c_✓e_✓-_✓L_✓e_✓v_✓e_✓l _✓D_✓e_✓b_✓u_✓g_✓g_✓e_✓r, Richard M.
- Stallman and Roland H. Pesch; _✓U_✓s_✓i_✓n_✓g _✓a_✓s_✓: _✓t_✓h_✓e _✓G_✓N_✓U _✓A_✓s_✓s_✓e_✓m_✓b_✓l_✓e_✓r,
- Dean Elsner, Jay Fenlason & friends; _✓l_✓d_✓: _✓t_✓h_✓e _✓G_✓N_✓U _✓l_✓i_✓n_✓k_✓e_✓r,
- Steve Chamberlain and Roland Pesch.
-
- B✓BU✓UG✓GS✓S
- For instructions on reporting bugs, see the GCC manual.
-
- C✓CO✓OP✓PY✓YI✓IN✓NG✓G
- Copyright 1991, 1992, 1993 Free Software Foundation, Inc.
-
- Permission is granted to make and distribute verbatim
- copies of this manual provided the copyright notice and
- this permission notice are preserved on all copies.
-
- Permission is granted to copy and distribute modified ver-
- sions of this manual under the conditions for verbatim
- copying, provided that the entire resulting derived work
- is distributed under the terms of a permission notice
- identical to this one.
-
- Permission is granted to copy and distribute translations
- of this manual into another language, under the above con-
- ditions for modified versions, except that this permission
- notice may be included in translations approved by the
- Free Software Foundation instead of in the original En-
- glish.
-
- A✓AU✓UT✓TH✓HO✓OR✓RS✓S
- See the GNU CC Manual for the contributors to GNU CC.
-
-
-
-
-
-
-
-
-
-
- GNU Tools 1993/10/13 53
-
-
-